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

Kevin Lewis
seal-mask
.a{fill-rule:evenodd;}techdegree
Kevin Lewis
Front End Web Development Techdegree Student 9,667 Points

Not sure which part I messed up on.

Maybe I am missing a something but I cant tell.

index.html
<!DOCTYPE html>
<html>
  <head>
    <title>Lists and Links</title>
  </head>
  <body>
  <ul>
  <a href="cakes.html"><li>Cakes</li>
  <a href="pies.html"><li>Pies</li>
  <a href="candy.html"><li>Candy</li>
    </ul>  
  </body>
</html>

5 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! You're doing great! However, list items are the only allowed direct descendent of an unordered list or ordered list. This means that your links should be inside your list items, but currently your list items are inside your links.

I feel like you can get it with this hint, but let me know if you're still stuck! :sparkles:

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi again! Let's try a small example, shall we?

<ul>
   <li><a href="page1.html">Page 1</a></li>
</ul>

Here I have an unordered list that contains a list item as its direct descendant which is the only allowed direct descendant of an unordered list. Inside the list item is a link with the text "Page 1". When a user clicks on the "Page 1" text, they will be redirected to page1.html.

Does this help? :smiley:

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Treehouse highly discourages the posting of explicit answers that can be copy/pasted into a coding challenge. Might I inquire as to what you're confused about? I'm more than willing to help and explain as best I can :smiley:

I will do this. I will show you how the first list item should have been done and leave the rest to you.

  <li><a href="cakes.html">Cakes</a></li>
Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

It's not that I can tell. The only two links I see created in that video are not inside an unordered list. They come between paragraphs and are their own items. The Teacher's Notes specifically address how to use links inside lists.