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 trial

HTML HTML Basics Getting Started with HTML Lists and Links Challenge

In 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>
    <title>Lists and Links</title>

    <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>


I 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.

Michael Hulet
Michael Hulet
47,912 Points

You don't need to make a new <ul> for every <li>. An unordered list in HTML looks like this:


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
Michael Hulet
47,912 Points

Jason 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:

Michael Hulet
Michael Hulet
47,912 Points

HTML 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>

Oh! Explicit entries lacking quotation marks. Yes, I misunderstood their inclusion.


I 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
Michael Hulet
47,912 Points

Treehouse 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

Michael 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.