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

Can't get my image to show up.

I am using Atom text editor and am trying to get an image to show up on my page but its not showing. only the alt shows. I have the image saved to my desktop and i believe i am typing in the right command but its still not showing. Here is the code.

  <img src="FroggyMario.GIF" alt="FroggyMario" Border=0">

3 Answers

Does your relative path point directly from your html file to your image?

Example:

  • My html file is in C:\Desktop\MyWeb\
  • My picture is in C:\Desktop\MyWeb\img

I would need the following:

<img src="img/FroggyMario.GIF" alt="FroggyMario" Border=0 />
// This looks inside the "Desktop/MyWeb/img" folder.

Or,

  • My html file is in C:\Desktop\MyWeb\html\
  • My picture is in C:\Desktop\MyWeb\img\

I would need the following:

<img src="../img/FroggyMario.GIF" alt="Froggy Mario" border=0 />
// This first comes out of the "Desktop/MyWeb/htm/" folder, and
// Goes inot the "Desktop/MyWeb/img/ folder" and then looks for the image

Hope this helps!

Rob Allessi
Rob Allessi
8,600 Points

Hey Nicolas Higginbotham

The issue is most likely that the file path is wrong. I would suggest reviewing the following page about some helpful reminders and tips on setting your file path: https://css-tricks.com/quick-reminder-about-file-paths/

Hope this helps!

Thanks guys I'm looking into this now. Sorry i am really new but i really want to learn.

No need to apologize for being new, we were all new once and had to learn as well. Keep at it! :-)