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

I keep getting this error indicating that i need to set the second href element to 'pies.html'...but it IS set that way

getting an error that says my href is wrong but i'm pretty sure it's right...i know that sounds arrogant..

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

Dave Harker
PLUS
Dave Harker
Courses Plus Student 15,510 Points

Hi Richard Sherman

The hrefs need to be in the list item, not the other way around :) Easy mistake to make ... you had the right idea, just mixed up on the order.

Keep going and happy coding,
Dave.

If you found this information accurate and useful to your query please consider marking it as 'Best Answer' so the question will be marked solved. Thanks.

Thanks, that's what I ended up trying, for the 2nd list item. Weird though that it let it slide with the other two. Nonetheless, thanks for the quick reply, Dave!