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

General Discussion

Code Challenge Task 2

When I refresh Chrome the image for the Cupcake and alt image "Smells Like Bacon" does not show up. The image comes across as a small paper with a folded corner at the top right and what appears to be a torn corner on the bottom right.

The code is written as follows. <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Smells Like Bacon' Cupcake Company</title> </head> <body> <img src="img/logo.gif" alt="Smells Like Bacon"> </body> </html>

7 Answers

From the code you have given, everything looks okay. That image of the paper you are seeing is your browser telling you that it can't find the image in the code. Make sure that you're folder structure matches your code (i.e. there's an "img" folder in the folder where the index.html is, also called the root folder) and that the file extension is correct (e.g. if the picture file is called "dog.jpg" then in the code a .jpg extension would be used). The "alt" attribute is used for providing more information for people who can't see the screen and have narrator programs that can describe what the picture is.

Thank you James.

It in the original folder called img and the photo called logo.gif. I am not sure why it cant find it.

I am no expert so I apologize if this doesn't work but make sure that the "logo.gif" file is in the img folder. or remove the "img/" in the code. <img src="logo.gif" alt="Smells Like Bacon">

Thanks Kristopher. I tried that also. Didn't work. Perhaps some others will have ideas?

It really sounds like it is a file directory issue. I believe this file was titled "index.html". Check that the "index.html" file you are making these changes are the file that you viewing. Then re-check and see if the "img" folder is in the same file as the index.html file and that the "logo.gif" file is in the "img" folder.

That worked. Thanks Kristopher.

No Problem, Glad it worked. Keep up the good work. I have really enjoyed everything here so far. Feel free to ask me anything that I have already been through.