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 trialDane Elder
7,569 PointsPies.html is showing an error. I believe this code is right. What am I missing?
Having difficulty. First link accepted, second link not accepted. But I cannot see any differenc.
<!DOCTYPE html>
<html>
<head>
<title>Lists and Links</title>
</head>
<body>
<ul>
<li>Cakes</li><a href="cakes.html">
<li>Pies</li><a href="pies.html">
<li>Candy</li><a href="candy.html">
</ul>
</body>
</html>
2 Answers
Bono IJpelaar
27,372 PointsYou should write them like this: <li><a href="cakes.html">Cakes</a></li>. Because it's the text that has to be a link.
Kevin Becerra
14,243 PointsYou need to wrap the anchor tag inside the list item tag. The way that would be read would be as if the you have three list items and three separate anchor tags. The right way to do it is like this
<ul>
<li><a href="cakes">Cakes</a></li>
</ul>
Dane Elder
7,569 PointsDane Elder
7,569 PointsGot it. I will try that.