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 trialTonya Davis
1,313 PointsMake the text inside each list item a link. The first item should link to cakes.html, the second to pies.html and the
what am I doing wrong?
<!DOCTYPE html>
<html>
<head>
<title>Lists and Links</title>
</head>
<body>
<ul><li>
<a href="cakes.html" ></a> cakes</li>
<a href="pies.html"></a> pies</li>
<a href="candy.html"></a> candy </li>
</ul>
</body>
</html>
2 Answers
Timothy Long
Front End Web Development Techdegree Student 6,833 PointsYou need to move the text inside the <a>
tags.
This works for me.
<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>
Otherwise your links would be empty with no text. You would just have an invisible link next to the <li>
elements.
I made a quick little codepen to show you why you should put the text inside the <a>
tags.
Here: https://codepen.io/timlong454/pen/QVpJRV
I hope this is helpful!
Timothy Long
Front End Web Development Techdegree Student 6,833 PointsYou only have one opening <li>
tag. There should be one for each item in that list.
Let me know if you need a code example!
Tonya Davis
1,313 PointsWhen I had opening tag for each item, I still got the same message that the pie.html is incorrect
Tonya Davis
1,313 PointsTonya Davis
1,313 PointsOMG..... Thank You! I went to bed on this one-whew.