Impressive! With just five page elements, you’ve already created an interesting website!
Another essential HTML element is the unordered list. Items in an unordered list are referred to as list items. Each item is bulleted, not numbered. For example:
The HTML code for the list above:
<ul> <li>A list item</li> <li>A second list item</li> <li>A third list item</li> </ul>
About unordered lists:
ul tags create the unordered list.
li tags contain each list item.
Unordered list elements can be used to organize content on a webpage in a number of ways. Below we will use one to organize our website’s navigation menu, sometimes called a navbar.
Our navbar will go above the company heading h1 element, so first we will need to create some new lines. In index.html, press
enter to create several new lines between
First, we will create an h2 element to serve as the heading for the navbar. The text can read “Ollie”.
Run your code to continue.
Below the navbar
h2, create an unordered list element. The list items will be different pages a site user can visit:
<ul> <li>sign up</li> <li>search bikes</li> <li>reserve a bike</li> <li>about us</li> </ul>
After you insert all the list items, don’t forget to close the unordered list with a closing
Run your code to view the results in the web browser.