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

Make the text inside each list item a link. The first item should link to cakes.html, the second to pies.html

need help regarding this question,

index.html
<!DOCTYPE html>
<html>
  <head>
    <title>Lists and Links</title>
  </head>
  <body>
  <ul>
     <li> Cakes </li><a> href="cakes.html"</a> 
    <li> Pie </li> <a> href="pies.html"</a>
      <li>Candy </li> <a> href="candy.html"</a>
    </ul>
  </body>
</html>
Heidi S Wolff
Heidi S Wolff
12,757 Points

I'm having the same issue in the challenge.

5 Answers

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

href needs to be inside your <a> tags and the <li> tags should surround your <a> tags.

Balazs Peak
Balazs Peak
46,121 Points

You have to make a link out of the list elements, so everything will be inside of a list element tag. Inside will be a link tag, with an href attribute. And the attributes always go inside the tag, not after it.

Solution:

 <li>  <a href="cakes.html"> Cakes </a> </li>

You need to set the 'href' attribute of the second <a> element to 'pies.html'. any one knows how to define by example like' <li> <a href="pies.html"> Pies </a> </li> does anyone see any mistake which I am doing let me know .pls Its not going through.

Thank you to everyone that help me get through this solution

You need to set the 'href' attribute of the first <a> element to 'cakes.html'. <li><a href="Pies.html">Pies</a></li> is some one can tell me where I am doing wrong pls. I am not getting through.

<a href = 'cakes.html'> Cakes</a></ul>