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 trialAnthony Sharman
97 PointsNot exactly sure what I am doing wrong here, I can make targets into an unordered list, a .html, not a link apparently
So i was under the assumption that to make something a website you add <a href="http://Cakes.html" target=" _blank"> <li>Cakes</li> and so on. am i missing something?
<!DOCTYPE html>
<html>
<head>
<title>Lists and Links</title>
</head>
<body>
<ul>
<a href="http://Cakes.html" target="_blank"<li>Cakes</li>
<a href="http://pies.html" target="_blank"<li>Pies</li>
<a href="http://Candy.html" target="_blank"<li>Candy</li>
</ul>
</body>
</html>
7 Answers
Steven Parker
231,269 PointsBe sure your "a" tags are complete (both start and end tags are present, and all tags are enclosed with "<" and ">" symbols). Also be sure to place your "a" elements entirely inside the list item elements.
Anthony Sharman
97 PointsCan i have an example that i can add to my notes
Steven Parker
231,269 PointsOK, I added a comment to my answer with an example.
nymphsth
6,072 PointsWhat Steven was saying is this: <ul> <li><a></a></li> </ul>
Ben Reynolds
35,170 PointsAnother thing worth noting here, when your link points to another page within the same site you don't need "http://". If the linked page is in the same folder as the current page your href can just be the file name.
Anthony Sharman
97 PointsHow would that look then without the multiple http://
Ben Reynolds
35,170 PointsJust like Steven's example, you'd just have to swap the "some_url" part with the file the link points to:
<li><a href="some_file.html">Item Name</a></li>
Anthony Sharman
97 PointsThank you one and all
Steven Parker
231,269 PointsSteven Parker
231,269 PointsHere's a generic one:
<li><a href="some_url" >Item Name</a></li>
Note that there is both a starting <a> tag and ending </a> tag surrounding the name that will become the link, and the whole thing is inside the list item tags.