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 trialArellis Pena
1,742 PointsBummer! Over and over...
Can someone please help and tell me what is wrong with this code:
<nav> <ul> <li><a href="index.html"></a>Portfolio</li> <li><a href="about.html"></a>About</li> <li><a href="contact.html"></a>Contact</li> </ul> </nav>
It keeps saying I need to add index link to Portfolio. Thanks By the way, it does have the navigation opening on top it's just not showing on this for some reason.
4 Answers
Erik McClintock
45,783 PointsArellis,
The mistake is a small/simple one to make: You need to move your text inside your anchor tags. You currently have the text for each of your links (i.e. 'Portfolio') placed AFTER the closing anchor tag. They need to be between the opening and closing anchor tags, otherwise you have an empty link.
You have:
<li><a href="index.html"></a>Portfolio</li>
<li><a href="about.html"></a>About</li>
<li><a href="contact.html"></a>Contact</li>
You want:
<li><a href="index.html">Portfolio</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
Happy coding!
Erik
Rich Bagley
25,869 PointsHi Arellis,
Your links are not wrapping the label. The closing anchor tag will need to come after the label.
For example, you have:
<li><a href="index.html"></a>Portfolio</li>
This will need to become:
<li><a href="index.html">Portfolio</a></li>
Thanks
-Rich
Emma Willmann
Treehouse Project ReviewerQuick fix - the closing a tag should be after Portfolio, About, and Contact. That way both the image and the caption below it can be clicked on.
<ul>
<li><a href="index.html" class="selected">Portfolio</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
Arellis Pena
1,742 PointsThanks so much everyone!!! I can't believe I couldn't figure that out.
Rich Bagley
25,869 PointsNo problem, glad you managed to sort it.
-Rich
Arellis Pena
1,742 PointsArellis Pena
1,742 PointsThank You. That was so simple... lol
Erik McClintock
45,783 PointsErik McClintock
45,783 PointsMost of the time, that will end up being the case. The easiest mistakes to make are the hardest ones to spot!
Erik