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

I can't fix my broken image in html

I have tried everything but it won't work unless i have a png url copied from the web, it doesn't work with any downloaded pictures including png files

Could you include a code snippet of the image path? That way we can see how you can use a relative path as opposed to an absolute path.

My image is located in a folder called images this is what I coded.

<img src="images/sfs.png">

2 Answers

Hey Joep,

I can't see your code on the forum, so it's hard to tell what went wrong.

Are you including the folder that your image is inside of in the image path?

example:

<img src="/images/picture1.png">

Yes but it still won't work.

Is your image folder in the same folder as your HTML document? If not, try moving it into the same folder as your HTML doc and see if that works for you.