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 trialstr
3,149 PointsThe code challenge asked for <nav> & <ul> tags to be under the link within the header. I've done this, but get an error.
The code challenge asked for the <nav> & <ul> to be directly under the link in the header. I've done this, yet it returns an error when I submit saying "Be sure your <nav> element is directly after the link in the header." <header> <a href="index.html"> <nav> <ul> </ul> </nav> <h1> Nick Pettit</h1> <h2>Designer</h2> </a> </header>
That is currently what is in the Code Challenge. Thank you for your time.
5 Answers
Mark Josephsen
8,803 PointsAh, this is the error. Your link ends after the closing tag. So, your nav and ul elements should be after that closing tag. Not before.
Mark Josephsen
8,803 PointsIt's after the closing link tag? < /a>
str
3,149 PointsThe closing </a> is already in place after the <h1> & <h2> tags. Yes the code challenge asks for there to be a nav & ul element after the link in the header.
notf0und
11,940 PointsSean, here's how to post code on the forums. Start with 3 backticks (near your Esc key probably) and the language right after. Hit enter to start a new line, then paste your code. Once you've finished your code block, hit enter at the bottom and put another 3 backticks to close it.
```html
<header>
<h1>Paste your HTML code inside the triple backticks</h1>
</header>
```backticks here to end the code block
str
3,149 Points@Bryan H
Yes my code looks exactly like that. How do I go about posting my code? I initially typed it all out on my first post but I guess that's not displaying?
notf0und
11,940 PointsLike Mark said, you need to place the nav element after the </a>
, otherwise it's inside, not below.
I'll edit my previous comment to show you how to post code in the forum.
Mark Josephsen
8,803 PointsYou'll want your nav and ul elements after the closing < /a> tag. Otherwise, it's inside the link instead of after it.
str
3,149 PointsThanks for the helps guys! it worked. @Bryan H, yes please update your post or send me a link on how to post my code in the forum for future projects. Thanks once again guys.
Mark Josephsen
8,803 PointsNo problem! :)
str
3,149 Pointsstr
3,149 PointsOh okay!! That makes sense. Thank you for your help. I just now saw your comment, and that fixed my problem. Thanks once again.