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 trialBryant Caldwell
Courses Plus Student 530 Pointshow do I link portfolio to index.html?
How do I link the Portfolio page to the index.html page. I'm sure I have the code written correctly however, I keep getting the bummer message stating "that the portfolio page needs to be linked to the index.html page."
<!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>About</li>
<li>Contact</li>
<h1>Nick Pettit</h1>
<h2>Designer</h2>
</a>
</header>
<section></section>
<footer>
<p>© 2013 Nick Pettit.</p>
</footer>
</body>
</html>
1 Answer
Erik McClintock
45,783 PointsBryant,
It seems you may be submitting the challenge prematurely. You are correct; your Portfolio link does direct you to index.html. However, you need to also link your About and Contact pages, as per the instructions on the task:
'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”.'
Additionally, it looks like you have some other errors with your HTML. See below.
You have:
<header>
<a href="index.html">
<nav>
<ul>
<li><a href="index.html">Portfolio</a></li>
<li>About</li>
<li>Contact</li>
<h1>Nick Pettit</h1>
<h2>Designer</h2>
</a>
</header>
Which is not how the instructions have asked you to order your tags. You are also missing some closing tags.
Your HTML should be structured as follows:
<header>
<a href="index.html">
<h1>Nick Pettit</h1>
<h2>Designer</h2>
</a>
<nav><!-- your nav element should be below the anchor that was previously in the header tag -->
<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><!-- make sure to close your ul -->
</nav><!-- make sure to close your nav -->
</header>
Erik
Bryant Caldwell
Courses Plus Student 530 PointsBryant Caldwell
Courses Plus Student 530 PointsI did that as well and it still gave me the same error message, so I decided to try and do them one at a time and see if that would possibly change anything and it did not. I'll try that again just to be extra sure.
Erik McClintock
45,783 PointsErik McClintock
45,783 PointsBryant,
It may be the errors in your HTML structure that are causing the task to fail, if you have tried submitting with all three list items linked up correctly. See my updated response above, where I show you the errors you have in your HTML.
Let me know if you are still unable to pass the task!
Erik
Bryant Caldwell
Courses Plus Student 530 PointsBryant Caldwell
Courses Plus Student 530 PointsThanks Erik, You rock! I've been starring at that in my face for the past 30 mins....
Erik McClintock
45,783 PointsErik McClintock
45,783 PointsThose are easy mistakes to make! Fresh eyes always help :)
Happy coding!
Erik