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 trialMarc Bernardino
810 PointsHow to link index.html to portfolio
I'm not sure how to do this. I've watched the video but I just seem to not get it. Can someone tell me what im doing wrong and walk me through it? Thanks!
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Nick Pettit</title>
</head>
<body>
<header>
<a href="index.html">
<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>
<h1>Nick Pettit</h1>
<h2>Designer</h2>
</a>
</ul>
</nav>
</header>
<section></section>
<footer>
<p>© 2013 Nick Pettit.</p>
</footer>
</body>
</html>
3 Answers
anil rahman
7,786 PointsThis is what it should look like:
<header>
<a href="index.html">--beginning of the link
<h1>Nick Pettit</h1>
<h2>Designer</h2>
</a>--end of link
<nav>--nav starts below that link above
<ul>
<a href="index.html"><li>Portfolio</li></a>--the a tag wraps around the li
<a href="about.html"><li>About</li></a>
<a href="contact.html"><li>Contact</li></a>
</ul>
</nav>
</header>
Your nav is placed in the wrong area. It's still within the top a tag because you have not spotted the closing a tag.
Steven Parker
231,269 PointsYour nav element needs to go after the link. At the moment it overlaps the link.
Move everything you added so that it goes between the line with the </a> and the one with </header>.
Other than placement, everything looks good.
anil rahman
7,786 PointsOops that's my bad copying and pasting skills lol i didn't notice that. It would still pass the challenge though but yes you are right it should be the other way round so li has a parent of ul.
Steven Parker
231,269 PointsSteven Parker
231,269 PointsThe
a
tag should NOT wrap around theli
, Marc had that part right.There should be nothing directly inside a
ul
other thanli
's.Marc Bernardino
810 PointsMarc Bernardino
810 PointsThanks!