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 trial

HTML How to Make a Website Creating HTML Content Create Navigation with Lists

Bummer! 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
Erik McClintock
45,783 Points

Arellis,

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

Thank You. That was so simple... lol

Erik McClintock
Erik McClintock
45,783 Points

Most of the time, that will end up being the case. The easiest mistakes to make are the hardest ones to spot!

Erik

Hi 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
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Emma Willmann
Treehouse Project Reviewer

Quick 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>

Thanks so much everyone!!! I can't believe I couldn't figure that out.

No problem, glad you managed to sort it.

-Rich