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 trialtaylor mckee
3,526 PointsIm stuck in this poop loop of agony.
I cant pass this section it's "Link each of the three list items..."
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Nick Pettit</title>
</head>
<body>
<header>
<a href="index.html">
<h1>Nick Pettit</h1>
<h2>Designer</h2>
<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>
</a>
</header>
<section></section>
<footer>
<p>© 2013 Nick Pettit.</p>
</footer>
</body>
</html>
3 Answers
Corin Faife
9,564 PointsAt the moment you have made 3 list items, each of which contains a link. But this isn't the same thing as making each list item into a link.
Try putting the anchor tags outside the list item, like so:
<a href="index.html"><li>Portfolio</li></a>
etc.
Kristopher Van Sant
Courses Plus Student 18,830 PointsHey Taylor, poop loops of agony are certainly no fun. You have your nav and links correct, but the problem is that you've placed the nav inside of the anchor(link) tags that surround the h1 and h2. The nav should come after the closing anchor tag.
<header>
<a href="index.html">
<h1>Nick Pettit</h1>
<h2>Designer</h2>
</a> <--------the nav should come after this closing anchor tag-->
<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>
</header>
Corin Faife
9,564 PointsDamn, you're absolutely right. In my defence it was late at night when I answered...thanks for pointing it out!
Kristopher Van Sant
Courses Plus Student 18,830 PointsMy apologies for not responding sooner, but just wanted to say that I totally understand Corin! It's definitely easy, especially when it's late, to get lost in the code and get things turned around :)
taylor mckee
3,526 PointsYES. Thanks to your input, i've escaped the poop loop of agony. Thank you Corin Faife and Kristopher Van Sant.
Kristopher Van Sant
Courses Plus Student 18,830 PointsHooray! Glad we could help you escape it.
Kristopher Van Sant
Courses Plus Student 18,830 PointsKristopher Van Sant
Courses Plus Student 18,830 PointsHi Corin! Thanks for trying to help and provide an answer for Taylor! I just wanted to mention that the code you provided, however, is not valid HTML. a tags are not allowed as child elements for ul. I believe the only thing that can be a child of the ul are the lists(li). But within the li tags you can use other elements. Here's a Stack Overflow post discussing the same thing http://stackoverflow.com/questions/7275523/is-it-sound-to-wrap-a-list-item-in-an-anchor. I hope this helps clear some things up. Keep up the awesome work! And don't stop answering peoples questions :)