Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML Build a Simple Website Text Editors and HTML Images and Lists

Unordered List Query

I can't see the code on the video clearly when making the lists. I thought it was as per the below. But not sure the hash tag is right?! What should it be?

<li>a href="#"<About</a></li>

3 Answers

William Dahl
William Dahl
7,829 Points

In earlier HTML/CSS lessons they use an unordered list with links for the navigation menu.

eg

<ul>
<li class="about"><a href="#">About</a></li>
        <li class="pricing"><a href="#">Cupcakes & Prices</a></li>
        <li class="locations"><a href="#">Locations</a></li>
        <li class="contact"><a href="#">Contact Us</a></li>
</ul>

Note the hash is used in place of a website URL. Usually this is to scroll to a section of the page. Refer to this for an example

In the tutorial however, it is just used as a way to look like a link, but actually not really do anything.

To create an unordered list this will be the code for that:

<ul>
 <li></li>
 <li></li>
 <li></li>
 <li></li>
</ul>

An unordered list is specified by using the <ul></ul> tags within those tags you'll place your list items which are specified with the <li></li> tags.

Thanks guys much appreciated.