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 Creating HTML Content Create Navigation with Lists

1. What am I doing wrong?

Create a navigation element with an unordered list element after the link inside the header. Don’t add any list items or links just yet.

<nav> <ul> <li><a href=”index.html”>Portfolio</a></li> <li><a href=”about.html”>About</a></li> <li><a href=”contact.html”> Contact </a></li> </ul> </nav>

4 Answers

Patrick Koch
Patrick Koch
40,496 Points

a little bit less information but, I think it should looklike

<div class="header">
  <a href=""></a>
  <ul>
  </ul>
</div>

normally you would put <li>("list item") tags between the <ul>("unordered list")tags but your task-setting ask without.

sarahoostenbrug
sarahoostenbrug
300 Points

Hi Patrick,

sorry to resume the question above from Lee Ann. I tried to complete the first challenge (topic: How to Make a website, section: creating HTML content) as follows:

<header> <a href="index.html"> <nav> <ul></ul> </nav>

But this seems to be wrong. It always says: "Be sure to add a <nav> element after the link in the header." Well, that's actually what I did... And there is no other link included within the header. So, I really have no idea what the problem is. :)

Just now I found your answer and I have to say that it is not really clear to me. So could you maybe explain this a bit in more detail. Because I have to add those codes within a template from Nick Pettit's code challenge.

Thanks in advance for your help.

Cheers, Sarah

Nice pic. The lessons have not mentioned "div class" or "div" yet...

This is the question that I am trying to answer. Copied the wrong one above.

Link each of the three list items. Portfolio should go to “index.html”, About should go to “about.html”, and Contact should go to “contact.html”. My "wrong" answer: <nav> <ul> <li><a href=”index.html”>Portfolio</a></li> <li><a href=”about.html”>About</a></li> <li><a href=”contact.html”> Contact </a></li> </ul> </nav>

Patrick Koch
Patrick Koch
40,496 Points

Well 1. you need a list, then you to put a link in every list item to link to the certain side.

......
<ul>
    <li><a href="firstside.html">AnyName</a></li>
    <li><a href="secondside.html">AnotherLink</a></li>
    <li><a href="third.html">LastlinkfromList</a></li>
</ul>
......

just getting a list of a hrefs.

greetings Patrick