Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML HTML Basics Getting Started with HTML Lists and Links Challenge

kevinkrato
kevinkrato
5,452 Points

Site is claiming that I made a mistake on the second link. I have no idea what is wrong.

<li><a href="cakes.html">Cakes</li> <li><a href="pies.html">Pies</li> <li><a href="candy.html">Candy</li>

Claims that the pies input is incorrect. It would be great if i could get the correct code presented instead of nothing.

index.html
<!DOCTYPE html>
<html>
  <head>
    <title>Lists and Links</title>
  </head>
  <body>
  <ul>
    <li><a href="cakes.html">Cakes</li>
    <li><a href="pies.html">Pies</li>
    <li><a href="candy.html">Candy</li>
    </ul>

  </body>
</html>

1 Answer

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,623 Points

HI Kevin,

If you look at the code when you have it in the challenge, you will notice red squiggly lines under the </li> tags for all three lines. This means there is a syntax error in all three lines. The challenge is only pointing out the first one, because once that error is reached the rendering stops.

Here, on all three lines, you haven't closed the anchor tags. You have opening and closing <li> tags, but only opening <a> tags. Each one will need to be closed, so the line will be like

<li><a></a></li>

Hope that helps :) :dizzy:

kevinkrato
kevinkrato
5,452 Points

Thank you! I restarted the exercise to give it another go and I realized that I was missing the closing anchors. Practice makes perfect. Thanks!