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 trialshawna llewellyn
562 Pointswhy am I getting this wrong?
it says I need to set the 'href' attribute of the second <a> element to 'pies.html'. but I am pretty sure I did already. the other 2 are right and they are exactly the same as the pie one.
<!DOCTYPE html>
<html>
<head>
<title>Lists and Links</title>
</head>
<body>
<ul>
<a href="cakes.html"> <li>Cakes</li> </a>
<a href="pies.html"> <li>Pies</li> </a>
<a href="candy.html"> <li>Candy</li> </a>
</ul>
</body>
</html>
1 Answer
Jennifer Nordell
Treehouse TeacherHi there! You're doing great, but you've got the links and the list items a little backward. The only allowed direct descendent of an unordered list or an ordered list is a list item or <li>
. In your case, you've put your links around your list items instead of putting the links inside the list items. Here's some pseudocode:
You're doing:
<a><li></li></a>
But it should be:
<li><a></a></li>
Hope this helps!
edited for additional note
Because this is causing an error, it can't properly see the second list item which is why you're getting the error message you're getting.
shawna llewellyn
562 Pointsshawna llewellyn
562 Pointsthank you!