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 How to Make a Website Creating HTML Content Include External CSS

Images not showing up

When I preview my site I cannot see any of the images.

I am not sure why - my code seems to be set up correctly. I thought maybe it had something to do with my browser, but when I tried a new one I have the same result.

Can you help me to identify the source of the problem?

6 Answers

I figured out the issue. My folder had a capital letter in it but my code was in all lowercase.

Thank you anyway!

Matias Valenzuela
Matias Valenzuela
7,554 Points

You have to include css file first <link rel="stylesheet" type="text/css" href="css/mystyle.css">

If your css is located in the CSS folder and your images in IMG folder, you have to make sure you access the folder first.

../img/imagename.jpg for example is used when the css file is located inside a folder and your images are located in another folder. Submit your code using ''' to help you better

I believe that the code is correct. when I go to preview my work that is an image icon showing up as a placeholder for the image, but the actual image isn't there, as if it can't load.

But I can see images on all other webpages.

Here is my code:

<section> <ul> <li> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt=""> <p>Experimentation with color and texture.</p> </a> </li> </section>

Matias Valenzuela
Matias Valenzuela
7,554 Points

The file path to the picture is not found then , submit your code using at the beginning and the end

'''<section> <ul> <li> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt=""> <p>Experimentation with color and texture.</p> </a> </li> </section>'''

Did I do that right?

Matias Valenzuela
Matias Valenzuela
7,554 Points

Nop, read the markdown cheatsheet to know how to submit your code