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 HTML Basics Getting Started with HTML Lists and Links Challenge

ayrton spark
ayrton spark
2,090 Points

Is there a glitch in this quiz ?

Hey ,

I am doing a quiz where I need to edit code in a basic html course. I believe my code is correct and seems to come as expected in the preview. Here is the problem and my resolved answer: Change the "href" of pies to "pies.html". Below is what I did and can not for the life of me see what is mistaken!

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

I would appreciate some help.

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

  </body>
</html>

2 Answers

Stuart Wright
Stuart Wright
41,120 Points

I don't know why it's giving you that specific error, but to get the correct solution you just need to change the structure a little - the <a> elements should be inside the <li> element. You currently have your <li> elements inside your <a> elements.

ayrton spark
ayrton spark
2,090 Points

For shame! > Thank you!