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

"Smells Like Bakin"

I am having difficulties getting an image to pop up. I recently started the Web program and very new at this. Do I need to put the image in a certain area before I code it? <img src="img/logo.gif" alt="Smells Like Bakin">

<!DOCTYPE HTML> <html> </head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Smells like Bakin' Cupcake Company</tile> </head> </body> <img src="img/logo.gif" alt="Smells Like Bakin"> <ul> <li></li> <li></li> <li></li> <li></li> </ul> </body> </html>

are you using a mac?

yes

Could you copy and paste the code you're having trouble with? The first 4 spaces of each line need to be indented for them to show up on the forum. If there's no code involved, can you be a bit more specific? Thanks!

<img src="img/logo.gif" alt="Smells Like Bakin">

<!DOCTYPE HTML> <html> </head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Smells like Bakin' Cupcake Company</tile> </head> </body> <img src="img/logo.gif" alt="Smells Like Bakin"> <ul> <li></li> <li></li> <li></li> <li></li> </ul> </body> </html>

This is the part I have problems with. For some reason it is not working as I go along with the video. <img src="img/logo.gif" alt="Smells Like Bakin">

Jon Wood
Jon Wood
9,884 Points

If that's all you have then you probably, at least, need to also have the <html> tags.

3 Answers

James Barnett
James Barnett
39,199 Points

The way it works is that you have to put your images in the same folder relative, to your HTML file.

Here's an example:

file directory structure example

Does that help?

If not, here's a article where you can read up about absolute vs relative paths

if you want in image you're going to want the IMG code

<img src="name and place of image here without spaces.jpg"/>

Thank for everybody help.