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
Gregory Carmen II
1,912 PointsImages and Lists in the Web Making section
My picture never seems to show up on the web page, even though I typed in the command correctly. <img src="img/logo.gif" alt="Smells Like Bacin"> Anybody know what i did wrong?
10 Answers
John Locke
15,479 PointsLet us see the code that you used, and we can diagnose the problem.
Gregory Carmen II
1,912 Points< img src="img/logo.gif" alt"Smells Like Bacin"/ > Here is the code
John Locke
15,479 PointsGregory:
Try indenting your code blocks four spaces. The comments boxes will automatically turn that into monospaced code.
Gregory Carmen II
1,912 Points< img src"img/logo.gif alt="Smells Like Bacin"/ >
John Locke
15,479 PointsSee if this helps:
< img src="img/logo.gif alt="Smells Like Bacon" / >
You missed the equals sign. Happens to me a lot.
Gregory Carmen II
1,912 PointsThat did not help either, it still shows a broken image on the webpage. Is there anything else i missed?
Simon Rowe
1,321 PointsEasy ones to get wrong on occasions :-
Check the extension is correct
Check the path is correct
Check the image exists at that location so try and browse to the image outside of the page
James Barnett
39,199 PointsGregory -
Most likely it's an issue with the path, as that's the most common mistake we see posts about on the forum about images not showing up.
Here's a quick primer on file paths that should get you going.
Gregory Carmen II
1,912 PointsI checked the file path and I keeps leading to the index file I used for the website, even when I changed the source. What else could be wrong? I have a PC not a Mac.
jake hazelwood
3,848 PointsI have the same problem here iv typed the exsact same code out and you get a broken image I think its because the path is incorrect. Iv tried making folders up that are named img then putting my logo in the folder which has a file extension .gif It must be the path how do you guys make it find a picture?