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 trialPaul Smith
1,058 PointsWHY is this wrong?
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Nick Pettit</title> </head> <body> <header> <a href="index.html"> <nav> <ul> </ul> </nav> <h1>Nick Pettit</h1> <h2>Designer</h2> </a> </header> <section></section> <footer> <p>© 2013 Nick Pettit.</p> </footer> </body> </html>
Paul Smith
1,058 PointsHi David Sorry about the vauge question, Hi I have created a navigation element with an ul element after the link inside the header but I get its wrong. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Nick Pettit</title> </head> <body> <header> <a href="index.html"> <nav> <ul> </ul> </nav> <h1>Nick Pettit</h1> <h2>Designer</h2> </a> </header> <section></section> <footer> <p>© 2013 Nick Pettit.</p> </footer> </body> </html>
8 Answers
David Postlethwaite
9,355 Points<!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>
</a>
<nav>
<ul></ul>
</nav>
</header>
<section></section>
<footer>
<p>© 2013 Nick Pettit.</p>
</footer>
</body>
</html>
You need to add the nav element after the link element has been closed (</a>).
Wayne Priestley
19,579 PointsPaul, your missing a >
at the end of your nav
tag
Luke Glazebrook
13,564 PointsHey Paul!
To create navigation with unordered lists your code should be as follows:
<ul>
<li>Home</li>
<li>About</li>
<li>Portfolio</li>
</ul>
Try using this code to complete the challenge! If you can't get it to work comment back and I shall further assist you.
Also, for future reference, refer to the markdown cheatsheet when you want to post code because, as you can see, the code in your post isn't properly formatted.
Hope you have a great day!
-Luke
Paul Smith
1,058 PointsHi Thanks for that. I didn't understand the question properly.
Luke Glazebrook
13,564 PointsI'm glad you managed to get the problem solved.
Good luck with the rest of your site!
-Luke
Paul Smith
1,058 PointsHi its still coming up as wrong. I have put the nav element after the first link but I get the same error
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Nick Pettit</title>
</head>
<body>
<header>
<a href="index.html">
<nav>
<ul>
<li>Home</li>
<li>About</li>
<li>Portfolio</li>
</ul>
</nav
<h1>Nick Pettit</h1>
<h2>Designer</h2>
</a>
</header>
<section></section>
<footer>
<p>© 2013 Nick Pettit.</p>
</footer>
</body>
</html>
David Postlethwaite
9,355 PointsPaul, Did you include the <nav></nav> around the unordered list
Wayne Priestley
19,579 PointsHi Paul,
I've edited your code so it appears correct in your post.
Here is a link to explain how to use Markdown to post your code How to post code If you look at the bottom of the box when your typing a reply you will see Markdown Cheatsheet that will also explain how to post your code
Hope this helps.
David Postlethwaite
9,355 Points <nav>
<ul></ul>
</nav>
the first challenge doesn't require you to put anything in the unordered list. Hope this helps
-David
Paul Smith
1,058 PointsHi I have created a navigation element with an ul element after the link inside the header but I get its wrong.
Question
Create a navigation element with an unoreded list element after the link inside the header. Don' add any list items yet.
The error Be sure your <nav> element is directly after the link in the header
My Code
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Nick Pettit</title>
</head>
<body>
<header>
<a href="index.html">
<nav>
<ul></ul>
</nav>
<h1>Nick Pettit</h1>
<h2>Designer</h2>
</a>
</header>
<section></section>
<footer>
<p>© 2013 Nick Pettit.</p>
</footer>
</body>
</html>
Still getting the same error.
Wayne Priestley
19,579 PointsI've edited your code so it appears correct in your post.
Paul Smith
1,058 PointsHi David and everyone else
Now I understand it thanks for all of your patirnce.
Luke Glazebrook
13,564 PointsI'm glad you managed to get your problem sorted. Remember to mark a best answer so that people know that your problem has been solved!
David Postlethwaite
9,355 PointsDavid Postlethwaite
9,355 PointsPaul, Are you trying to do the the code challenge on making an unordered List? Need more information on what your trying to do.