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 trialMustafa Khan
6,224 PointsWhat did i do wrong?
i put the href for each one, so what is my mistake?
<!DOCTYPE html>
<html>
<head>
<title>Lists and Links</title>
</head>
<body>
<ul>
<li><a href=cakes.html>Cakes<a></li>
<li><a href=pies.html>Pies<a></li>
<li><a href=candy.html>Candy<a></li>
</ul>
</body>
</html>
4 Answers
Cobe Learns
25,333 Points<!DOCTYPE html>
<html>
<head>
<title>Lists and Links</title>
</head>
<body>
<ul>
<li><a href="cakes.html">Cakes</a></li>
<li><a href="pies.html">Pies</a></li>
<li><a href="candy.html">Candy</a></li>
</ul>
</body>
</html>
hi,
you need to put .html in "" and you need to close </a>
hope it helps
Mustafa Khan
6,224 PointsI'm sorry, I still don't understand
Cobe Learns
25,333 Pointsok - this is your code -
<li><a href=cakes.html>Cakes<a></li>
first mistake - you need to put cakes.html in quotes like "cakes,html" second mistake - you need to close a tag when you open it - you have <a> and you need to close it </a> , just like you did with li <li> list item </li>
eslam said
Courses Plus Student 6,734 Pointsas cobe told you your code should be like that
<li><a href="cakes.html"></a></li>
further explanation :
- when using href or src attribute you have to surrouned your url with " "
- every element in html has an opening and closing tag and there is some exception but overall don`t forget to close your opening tag example :
<li></li>
<p></p>
<h1></h1>
Mustafa Khan
6,224 PointsMustafa Khan
6,224 PointsWhat did u mean?