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

Images won't show up on my website

Here is my code....

<body style="background-color: #B8B8B8 ;">
     <img src="My Documents/img/logo.jpg" alt="Image">

[[ed. note]] Added markdown to fix code formatting

7 Answers

Ricky Dodd
Ricky Dodd
3,241 Points

There's... no code. If you post it, I'll try my best to help.

<body style="background-color: #B8B8B8 ;"> <img src="My Documents/img/logo.jpg" alt="Image">

My code is not showing up..

To correctly display code inside the forums make sure to indent your sentence with 4 spaces (or a single tab) to turn it into a code block. If the code is multiline every line should be indented as well.

I would create a new folder on your desktop, save all your stuff into there. Makes it much more organised and easier to navigate.

Elliott Frazier
PLUS
Elliott Frazier
Courses Plus Student 9,647 Points

the first thing you want to do is put all the pictures you want to use into the same folder your index.html file is in so it can be relevant, then shorten the file path to just the picture name and file type (in your case "logo.jpg").

Hope this helps!

Ricky Dodd
Ricky Dodd
3,241 Points

I'd take Jack and Elliott's advice on that. Also, you shouldn't use inline CSS. It's terrible practice.

There's three parts to a website: Structure, presentation and behavior. You should always keep these separated by linking to the documents. (HTML, CSS and Javascript/JQuery; respectively.)