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

my anchor and href tag wont work. i set it up like: <li><a href:"cakes.html">Cakes</a></li>

what am i doing wrong here? tried googling and tried different ways, but it's always incorrect....

index.html
<!DOCTYPE html>
<html>
  <head>
    <title>Lists and Links</title>
  </head>
  <body>
    <ul></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>

3 Answers

Hi Lars,

You'll kick yourself when you see it but it is a simple error: href should be set with a "=" not a ":" as you have

ie your code should be

<a href="Cakes.html">Cakes</a>

Hope that helps Don :-)

Dave StSomeWhere
Dave StSomeWhere
19,870 Points

You have a syntax error in your anchor tag

Check how you are specifying the href attribute.

Hey, Don! hahah, that did the trick. Sometimes it's hard to see when it's so obvious :-)

No worries Lars. I've done it a thousand times myself :-)