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

I have made the list into a link but i am still getting it wrong.

it's saying the element between <a> should be "cakes.html". I have that and its still saying its wrong

index.html
<!DOCTYPE html>
<html>
  <head>
    <title>Lists and Links</title>
  </head>
  <body>

  <ul>
    <li><a href= "Cakes.html" </a></li>
    <li><a href="pies.html"  </a></li>
    <li><a href= "candy.html" </a></li>
    </ul>

  </body>
</html>

3 Answers

Jamie Reardon
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Jamie Reardon
Treehouse Project Reviewer

Hi there Tifara!

It appears you have a small syntax error which is the whitespace between your href attribute and its equals (=) sign between the quotation marks. You also have the same formatting after the value Cakes.html with a space before the closing anchor tag </a>.

This should fix it:

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

Don't add whitespace between an attribute (href) and its value ("cakes.html") and before the closing tag of elements </a>

Also, try to use lowercases for your pages instead of Cakes.html, use cakes.html...it might be another cause for error!

thanks

Jason Anders
Jason Anders
Treehouse Moderator 145,860 Points

Hi Jamie Reardon and Tifara Gordon

For the most part, whitespace in HTML and CSS doesn't matter. Here it's not the whitespace that is causing the Tifara's error. While ascetically it looks better without the spaces, and no spaces is the common practice, it won't cause an error. Here there are two error. One a syntax and one a spelling error.

  • First the syntax error: the closing > is missing for the opening anchor tags.
  • Second, the spelling error: The poster is using "Cakes" with an upper-cased "C", when the instructions explicitly ask for "cakes" with a lower-cased "c". Instructions are specific and always need to be followed exactly. A typo, missing punctuation, wrong word or case, will almost always cause an error.

I just wanted to add some more detail to your answer and to provide further clarification as to why your provided code passes, while the posted code doesn't.

Keep up the nice work in the Community!! :) :dizzy:

mohammed osman salah
mohammed osman salah
9,587 Points

no you are missing clossing of a you writed like this <li><a href="cakes.html"</a></li> <li><a href="pies.html"</a></li> > <li><a href="candy.html"</a></li> a tag is open you did not close it <a......> you are missing > before </a> you are missing only > sign in to close a for exmaple <a href="something.html> write something or leave empty </a>

Jamie Reardon
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Jamie Reardon
Treehouse Project Reviewer

Yeah you are right, I assumed that they had already had that and I overlooked that because I am talking to my girlfriend and got distracted haha :P