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 trialJustin Warren
7,805 PointsA bit of help please!
Not sure what I'm doing wrong in the formatting of this ul. Thanks!
<!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>
3 Answers
Anthony Quinn
4,432 PointsThis looks correct to me. A few things that could be nit-pic that could cause the issue, but this is just a guess
- You might move the<a> link to inside the <li> and just have it around the Text. For example
<ul>
<li><a href="cakes.html">Cakes</a></li>
</ul>
- Some people prefer that you use double quotes when defining the attributes instead of the single quote. Not sure if that is due more to the way this forum formats code or how you actually wrote it.
Neither of these things make a big difference in implementation, but could possibly cause a problem with code checking algorithms.
Michael Maitoza
3,805 PointsHi Justin, Here is your code: <!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>
What I think needs to happen is that these lines here are the source of the issue: <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> Try looking at how the <li></li> are placed. I think if you take a look you'll see that the <li></li> must be placed outside of the <a> tags.
Justin Warren
7,805 PointsThanks for the help guys!
Anthony Quinn
4,432 PointsAnthony Quinn
4,432 PointsThis looks correct to me. A few things that could be nit-pic that could cause the issue, but this is just a guess
Neither of these things make a big difference in implementation, but could possibly cause a problem with code checking algorithms.