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

Code Challenge showing as "incorrect"

I'm working on the HTML Basics course, and my answer in one of the challenges is coming through as wrong. When it says where I need to edit it, my answer appears to display what it should say, but is still showing as incorrect. It says the second attribute should link to "pies.html" and it does - could you help me figure out why it's showing as incorrect?

Here is the link to the challenge (#2): https://teamtreehouse.com/library/html-basics-2/getting-started-with-html/lists-and-links-challenge

The code I've entered for the second is the same as the rest, basically: <li><a href="pies.html">, but it says "You need to set the 'href' attribute of the second <a> element to 'pies.html'.". It's not showing an error for the other lines that are set up the same way. Am I missing something? Thank you!

1 Answer

Hi! you need to close your <a> with </a> like this

<!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>