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

Challenge not working?? Or is something wrong??

I'm on stage 3 of a code challenge for creating a navigation link thing, and it isn't letting me pass the challenge. It's saying it's wrong, even though I believe the code is right.

it's saying "Bummer: the portfolio list item should link to 'index.html'. Haven't I done it correctly?? or is the challenge glitching?? :/

Here's my code:

<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>
      </ul>
    </nav>

2 Answers

Not sure what code they start you out with in the editor for your challenge, but be sure you're only adding the code they are asking for. Challenges are very particular with what they'll accept, so be sure to follow the directions closely.

For example, it is possible that your code is not passing because you performed extra steps; if the challenge didn't ask you to provide those other list items, remove them and try submitting again.

EDIT: Just ran back through the challenge and I think the issue are the spaces preceding and following the text inside your anchor elements. Again, these things are very particular so try your code like this:

      <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>
        </ul>
      </nav>

Yes it is telling me to link all 3... i cant highlight it sorry so I can't show you. but it is annoying :/

Thanks, maybe i'll check the whole code again just in case!!

Updated my answer, check it out under the EDIT section :)

I've completed the challenge, I think I accidentally muddled up the order of some of the code they start the challenge with, haha... anyway, i've passed it now. Thankyou for helping!! :)