Current Assignment(s)
P2: The Instructables Site
Due: Recommended by Monday, 6.04
Due: Recommended by Monday, 6.04
Adding Style
You can also style ul
, ol
, dl
lists by declaring their elements in the <style>
, adding color, alignment, etc.
List items (li
) can also be declared, as showcased a few pages back.
HTML
<head>
<style>
ul {background-color: lightgray; text-align: center;}
li {display: inline; padding: 5px;}
</style>
</head>
<body>
<nav>
<ul>
<li><a href="./home">Home</a></li>
<li><a href="./pages/about">About</a></li>
<li><a href="./pages/contact">Contact</a></li>
</ul>
</div>
<!-- Further page content -->
</body>
- Previous
- Next