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

Image proplem

i'm fallowing the beginners html video on how to add a a image called "image", but after i refresh the page i get a block. i followed the video from start to finish and cant figure out what is the problem here is my code:

.<!doctype html>

<html lang="en">
 <head>
  <meta charset="utf-8">
   <title>my page</title>
 </head>
 <body>
    <p>My fav Group!!!!!</p>

    <img src=" shinee color.jpeg ">

    <p>Aren't they CUTE!!!</p>

 </body>
</html>

this is the pictures exact! name "shinee color" it is a jpeg image

4 Answers

thanks for your answer, I cant believe i made such a stupid mistake. i guess that's how it is being the second day of html. The funny thing is the image says JPEG but jpg is what worked

Great tip, Samantha!

Samantha Atkinson
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Samantha Atkinson
Front End Web Development Techdegree Graduate 40,307 Points

I have made that mistake myself so many times lol.

Thanks Dustin Matlock, would have acknowledged your comment before, but I'm new to the forums. Just worked out how to reply to you. Embarrassed icon face would fit in here right now lol

Hello, Jovonne. You just need to remove the space to make it <img src="shinee-color.jpeg">. You don't need the dash but it makes it more readable. HTML doesn't allow you to have spaces in file names.

thank you for such a quick answer, but i did what you said and i'm getting the same problem.

Did you also change the file name to shinee-color.jpeg

yes i did, is that bad?

Make sure the image is in the same directory as the HTML file. That's the only other thing that could cause it not to show.

Francisca Picon Galvez
Francisca Picon Galvez
11,759 Points

Hi Jovonne! Where do you have your image stored? I think your problem could be related with where you have your files saved. The way you have it in your code, your html file should be saved at the same level, not in any folder.

thanks for your answer, but they are both in the same folder.

Jose Perez
Jose Perez
2,109 Points

I am not sure if this would make a difference but you should change your doctype element to <!DOCTYPE html> you don't have it capitalized on your example.

thanks for your answer and no it didn't change anything