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 HTML Objects Images

Why can't I get an image to display on my website even though I'm using the html "img" element correctly?

I'm trying to follow along with Nick's HTML "Images" tutorial, but my jpeg image won't display properly on the web page and I don't understand why. I think I'm doing things correctly using the img element and source attribute. Do pictures need to be a certain size or dimension in order to work?

Use the Markdown Cheatsheet to paste your code. Otherwise we can't tell what exactly is wrong.

1 Answer

Adam Waxman
Adam Waxman
8,779 Points

Without seeing the code it is hard to know but if I had to guess the source location is pointing to the wrong directory. I'd double check which directory the img tag is pointing to