Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML

brandonlind2
brandonlind2
7,823 Points

I'm having trouble linking images with the img src tag.

I don't seem to be able to link imgs correctly and I can't figure out what the issue is. I have a root folder named info and two subfolders named css and img. Within the img subfolder I have two images I'm trying to link named leaf.jpg and trichomes.jpg. I got these imgs off google images and they aren't working, but images from treehouse's downloads are? Is it the images or my code? The code I'm using is

<section> <ul> <li><img src="img/trichomes.jpg" alt="sorry image isn't available"> </li> <li><img src="img/indicaleaf.jpg"></li> <li></li> </ul> </section> help would be greatly appreciated ty

2 Answers

Are you certain that the images are .jpg? Check the file extensions: right click => properties => should be right under the name..

also: make sure that the index.html is in the root folder. If it isn't then the src extensions are wrong.

if that isn't it, include entire index.html in troubleshoot.

brandonlind2
brandonlind2
7,823 Points

Thanks for the reply, they're all .jpg and all the html pages are in the root folder. I'm having no problems with the images I downloaded from treehouse, I'm just having issues with images I got from google images. Is it possible to encript images or something, so other people cant use them on webpages? include the entire index.html in troubleshoot? how would I do that?

Just see if you haven't misspelled a name or something, this could possibly happen.