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 Structure the Image Gallery

I posted the picture on my page and it just showed up with with a little box. I have checked the code and file. Help.

I have <img src="img/numbers-01.jpg" alt=""> typed and the file has the pictures.

Conor, could you post your code?

Holt Hunter
Holt Hunter
4,629 Points

Could you show us your HTML and CSS please?

1 Answer

Stephen Perez
Stephen Perez
4,229 Points

Until you post your code and someone can suggest a specific fix: Let's say you know to check your syntax, and to check for unclosed tags or elements. Let's also assume that you know how to call the image using the correct directory path.

Everything is working fine when I do something like this:

<a href="img/ring/r1.jpg">    r1.jpg
  <img src="img/ring/r1.jpg" alt="">    r1.jpg

However, if either of two following things happens, my image breaks as you seem to describe.

1)

<a href="img/ring/r1.jpg">    r1.jpg
  <img src="img/ring/r1.jpeg" alt="">    r1.jpeg

NOTE that in my anchor element I call "jpg" and in the image element "jpeg." This inconsistency is a problem.

2) A similar problem happens when you upload the image, and Workspaces shows it as "Image folder->Ring Subfolder->r1.jpg" yet when you refer to it in your code, you perhaps type ".jpeg" or ".JPG" or ".JpG" etc. If the two cases are not matching, there is a possibility for it to be broken.

Note that in the case where, in your actual image properties (outside of Workspaces) your image may be ".jpeg" in Windows, while Workspaces is labeled ".JPG" , use strictly what is uploaded and showing in your personal Workspaces sidebar.