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 How to Make a Website Adding Pages to a Website Add a New Page

Navigation on my webpage

When i open the preview to my webpage, the about and contact links are not linked, they are simply text within a list item at this point. I'm not sure what i did wrong with my code.

1 Answer

Without viewing your code I say this is the issue:

html
<nav>
     <ul>
        <li>About</li>
        <li>Contact</li>
    </ul>
</nav>

What's going on is that you've probably properly listed the items in an un-ordered list and as childs with list item tag, but you failed to make them anchors tags inside the list item which gives the text an appropriate link. It should look something like this below:

html
<nav>
     <ul>
        <li><a href="about.html">About</a></li>           <!-- where file.html is in red is where you should be linking your file -->
        <li><a href="contact.html">Contact</a></li>
    </ul>
</nav>

With the anchor tags in place, whenever you click on the wording it should go to the other page as along as there is a path specified in the href attribute

<a href= "file.html"> click me</a>

or

<a href="http://google.com">Go To Google</a>

Hope that helps!