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

Jared Lohrmann
Jared Lohrmann
1,178 Points

I am unsure of where to put the <a></a> to make the <li></li> a clickable link.

So I am putting the <a></a> around the inside and that didn't work. Then around the outside and once again not working. Do I not need <a></a> or is this a completely different problem?

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


2 Answers

Alex Koumparos
Alex Koumparos
Python Development Techdegree Student 36,887 Points

Hi Jared,

I think you're getting a little muddled between <li> (list item) and <a> (anchor).
First, you've put the href attribute that is part of the anchor tag inside the list item tag.
Second, as for the where to put the anchor tags, the challenge text reads:

Make the text inside each list item a link.

Thus the anchor tag should go around the text, but be inside the list item.

Hope that's clear,


Josh Divis
Josh Divis
Python Development Techdegree Student 8,825 Points

You need to close your link tags and add an anchor tag. Other than that it looks like it should work. <li><a href.....>Pies</a></li>