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

Is there something wrong with my code?

Hey Guys, I'm very new to this but i'm on a code challenge:images and lists. it keep rejecting my code, can someone point out what i'm doing wrong

<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Smells Like Bakin' Cupcake Company</title> </head>

<body> <img src="img/cupcake.jpg" <UL> <li><a href="#">About</a></li> <li><a href="#">Cupcakes</a></li> <li><a href="#">Locations</a></li>

</UL> </body> </html>

5 Answers

never mind, i finally worked it out but thanks anyway!

What is the code challenge you're being asked to complete?

Hey there! I'm going to go out on a limb and it looks like you are not formatting your page correctly in regards to html. Take a look at the example below that has various elements of html formatted correctly. Remember, anything you plan on displaying needs to go between the <body> tags of your html.

<!DOCTYPE html>
<html>
<head>
<title>Some Title</title>
</head>
<body>
      <!-- image in displayed with html -->
      <img src="image/something.jpg">

<!-- a unordered list in html -->
<ul>
    <li>Cats</li>
    <li>Dogs</li>
</ul>

<!-- an unordred list with images -- >
<ul>
    <li><img src="image/something.jpg"></li>
    <li><img src="image/somethingelse.jpg"></li>
</ul>

</body>
</html>

I just went back and completed the section called Images and Lists and I assume you're stuck on this challenge:

"Add the items "About", "Cupcakes", and "Locations" to the unordered list."

If so, your code should look like this:

<body>
   <ul>
      <li>About</li>
      <li>Cupcakes</li>
      <li>Locations</li>
    </ul>
</body>

Your list item tags should go between your opening and closing unordered list tags, which all go between the opening and closing body tags like so. Your Doctype tag should be at the very top and not involved.

Glad you figured it out! Good luck!