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 Build a Simple Website Text Editors and HTML Images and Lists

Shawn Frambach
Shawn Frambach
2,265 Points

My pictures won't show up in the browser

Just as stated above, My pictures will not show up in the browser after putting the code in. Im not sure what Im missing. is it ok for the source folder to be in another folder, like "pictures ->logo folder ->logo.jpg"?

Stone Preston
Stone Preston
42,016 Points

can you post the code you are using for your img tags? Its ok for them to be in any folder, as long as your provide the correct path

5 Answers

I had the same problem and figured out that the index.html and the ing folder have to be in the same folder => You should have the img folder and your index.html in the same project folder (the one you downloaded with all the Smells like Bakin stuff in it). I made the mistake and saved the index.html on my Desktop and it didn't work.

Shawn Frambach
Shawn Frambach
2,265 Points

Ahh got it. I was just figuring this out. Thank you so much! To both of you.

Shawn Frambach
Shawn Frambach
2,265 Points

Sorry, should have done that first, huh? lol

<!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/logo.gif" alt="Smells Like Bakin">
<ul class="nav">
<li><a href="a">About</a></li>
<li><a href="a">Cupcakes & Prices</a></li>
<li><a href="a">Locations</a></li>
<li class="last"><a href="a">Contact Us</a></li>
 </ul>
</body>
</html>
Shawn Frambach
Shawn Frambach
2,265 Points

Alternatively I have another photo I want to use. It's in my "pictures" tab in my "Library" folder. the file is called "4U"

I originally tried =

<img src="pictures/4U.jpg"
Stone Preston
Stone Preston
42,016 Points
<img src="img/logo.gif" alt="Smells Like Bakin">

that will set the src to the image named logo.gif thats located in the img folder thats located in the root of the project. Are you sure the image is named logo.gif? are you sure you have a folder called img?

Shawn Frambach
Shawn Frambach
2,265 Points

I am sure about the image name. So does the img folder have to be somewhere specific according to how I coded it? Is there a proper way to put it at the root of my project

Giridhar Nalakari
Giridhar Nalakari
493 Points

hi provide the complete path like img src="D:/newfolder/logo.gif