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 trialKevin Lewis
Front End Web Development Techdegree Student 9,667 PointsNot sure which part I messed up on.
Maybe I am missing a something but I cant tell.
<!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
Treehouse TeacherHi 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!
Kevin Lewis
Front End Web Development Techdegree Student 9,667 PointsIβm even more confused now. Can you just tell me whatβs missing so I know for next time?
Jennifer Nordell
Treehouse TeacherTreehouse 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
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>
Kevin Lewis
Front End Web Development Techdegree Student 9,667 PointsI understand now. Thank you. Why is it the other way around in the teaching video?
Jennifer Nordell
Treehouse TeacherIt'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.
Kevin Lewis
Front End Web Development Techdegree Student 9,667 PointsModeled my lines after yours and it still says the same thing.
Jennifer Nordell
Treehouse TeacherIt'd be helpful to see your code
Kevin Lewis
Front End Web Development Techdegree Student 9,667 PointsHad to make another post to display the updated code.
Kevin Lewis
Front End Web Development Techdegree Student 9,667 PointsKevin Lewis
Front End Web Development Techdegree Student 9,667 PointsStill donβt understand
Jennifer Nordell
Treehouse TeacherJennifer Nordell
Treehouse TeacherHi again! Let's try a small example, shall we?
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?