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

Kjetil-Lennart A. Lorentzen
Kjetil-Lennart A. Lorentzen
13,390 Points

It saysto set the second list-item's href to "pies.html" i did it like this: <a href="pies.html"><li>Pies</li></a>

It's not passing me. WHAT am i doing wrong? or is the test doing wrong?

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>
    <li>Candy</li>
  </ul>  
  </body>
</html>

2 Answers

Hey Kjetil! You a little off here, first is that the challenge asks you to link all the 3 list items, not just the pies and cakes. Secondly is that your should not be linking the list item, you should be linking the actual text. Lastly, i dont recommend using the random identation stuff you have done, it can cause trouble sometimes. Your code should look like this:

    <li><a href="cakes.html">Cakes</a></li>
    <li><a href="pies.html">Pies</a></li>
    <li><a href="candy.html">Candy</a></li>
Kjetil-Lennart A. Lorentzen
Kjetil-Lennart A. Lorentzen
13,390 Points

Damn you fast! got to love teamtreehouse, thank you. Thanks for the indentation-advice, i just had a hard time controlling my OCD, the closing tags were not on a line, haha!

I saw now that the anchors should be inside the li's, and that i forgot the last list item. I am sorry to disturb for this, i guess i had too much coffee this morning.

Have a great day behar

Haha, glad go help Kjetil! You can mark the question as "solved" by sellecting a "best answer".