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 trialGerald Sellers
408 PointsIn the href portion although I re-entered the attribute to pies.html after the equal sign I am told that I am wrong.
What should be done when the href attribute has been corrected within the anchor points?
<!DOCTYPE html>
<html>
<head>
<title>Lists and Links</title>
</head>
<body>
<ul><li><a href=cakes.html>Cakes</a></li></ul>
<ul><li><a href=pies.html>Pies</a></li></ul>
<ul><li><a href=candy.html>Candy</a></li></ul>
</body>
</html>
Michael Hulet
47,913 PointsYou don't need to make a new <ul>
for every <li>
. An unordered list in HTML looks like this:
<ul>
<li>First</li>
<li>Second</li>
<li>Third</li>
</ul>
Notice that there is only one <ul>
tag in the list, and several <li>
tags nested within that list. Every time you make a new <ul>
tag, you're making an entirely new list, but you only want 1 with several elements (<li>
tags) in it
5 Answers
Michael Hulet
47,913 PointsJason Anello pointed out to me that my first answer isn't actually the correct one to solve this issue. I didn't notice it at first glance, but in the code in your question, every element is wrapped in its own ul
tag. This shouldn't be so. You only need 1 ul
/ol
tag to denote a list, and you can have multiple li
tags within that 1 ul
/ol
tag, like this:
<ul>
<li>One</li>
<li>Two</li>
<li>Three</li>
</ul>
Michael Hulet
47,913 PointsHTML attributes need to be wrapped in quotes. For example, if I wanted to make a link to this question, it'd look like this:
<a href="https://teamtreehouse.com/community/in-the-href-portion-although-i-reentered-the-attribute-to-pieshtml-after-the-equal-sign-i-am-told-that-i-am-wrong">This question</a>
Gerald Sellers
408 PointsOh! Explicit entries lacking quotation marks. Yes, I misunderstood their inclusion.
Merci.
Gerald Sellers
408 PointsI continue to have problems with these entries. I am unsure of whether the problem is that I have added the treehouse.com/HTML Basic to denote where the various HTMLs are to be found or whether I am adding to much after I have removed the <ul></ul> tags. What is your opinion?
Michael Hulet
47,913 PointsTreehouse challenges can be a bit finicky and they don't really like it when you add more than what they ask for. It's great that you're going the extra mile, but it'd probably be best just to make the unordered list and wrap everything in <li>
and <a>
tags like the challenge asks
Gerald Sellers
408 PointsMichael Hulet's answer seemed to be the best answer because it gave me the usage pointer of less response being adequate to meet the challenge task.
Gerald Sellers
408 PointsGerald Sellers
408 PointsI have tried to fashion my entry to resemble yours with little success. Example: <ul><li><a href="https://treehouse.com/HTML Basics/cakes.html">Cakes</a></li></ul>. I am unsure where to go from here.