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 making these texts pies,candy andcakes to be linking to candy.html and pies.html and candy.html.

i set the 3 texts prefectly to be linking, but its not letting me pass the challenge its telling me to add <ul></ul> code to it and i did but nothing happen. my previous challenge was to set the 3 texts to unordered list and i did it this way and i pass the challenge, i believe the seond code is need to have the <li></li> element i tried to set it before the <a>attribute but i always get error that is you need to set href <a></a> first in your code and idid but did not let me pass, i did it even i know it not right! Bummer: You need to set the 'href' attribute of the first <a> element to 'cakes.html'. help please

<ul> <li>cakes</li> <li>pies</li> <li>candy</li>

index.html
<!DOCTYPE html>
<html>
  <head>
    <title>Lists and Links</title>
  </head>
  <body>
  <ul>
      <a href="http://cakes.html">cakes</a>
      <a href="http://pies.html">pies</a>
      <a href="http://candy.html">candy</a>
    </ul>
  </body>
</html>

1 Answer

Emmanuel C
Emmanuel C
10,636 Points

Each of your links should be wrapped in a "li" tag, That way each link would be considered a list item.

<ul>
    <li><a href="http://cakes.html">cakes</a></li>
    <li><a href="http://pies.html">pies</a></li>
    <li><a href="http://candy.html">candy</a></li>
</ul>

i did it before and now and it is still giving me this error : You need to set the 'href' attribute of the first <a> element to 'cakes.html' <ul> <li><a href="http://cakes.html">cakes</a></li> <li><a href="http://pies.html">pies</a></li> <li><a href="http://candy.html">candy</a></li> </ul>

Thanks for your help!! i got it work by adding the <li> and removing the http://