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

why pictures won't show when i use atom text editor?

alright so i wanted to try another text editor so i chose atom. i made a new folder name portfolio than i created a file name index.html and also a folder name images. and then wrote simple code for images it will show as smal box type usually what u see when pics can't show.

<section> <ul> <li> <img src="/images/numbers-01" alt=""> </li> </p>picture</p> </section>

Hi Hamza,

Can you post your image code please and we'll take a look?

Thanks

-Rich

4 Answers

Hi Hamza,

Sounds like you are referencing the wrong directory. Make sure you do something like this:

<img src = "img/image_name.png" alt = "">

i don't exactly know how to use markdown feature so i'm just not gonna put less then signs okay but here is my code

section ul li img src="/images/numbers-01" alt="" /li /p pictures /p /section

Is your images folder in the same directory as your html? If so try this:

<img src="images/numbers-01.png" alt="">

(Lose the / before images and add file extension)

yeah still won't work i'm sorry to bother you i have a portfolio folder inside i have a index.html file and a images folder where i got all the images. idk what im doing wrong.

Could you list your directory structure? So I have an idea where the html file and image files are located.

portfolio ///////index.html ///////images /////////////numbers-01

Here's an animation for you.

Posting Markdown at Treehouse

Okay the above should work. Are you using the correct file type such as .png .jpg

omg yes its working now i wasn't putting a format .jpg at the end of the pictures. thankyou so much michael jurgensen for not giving up and helping i really appreciate it. :)

No problem. I am glad its working.

i don't exactly know how to use markdown feature so i'm just not gonna put less then signs okay but here is my code

section ul li img src="/images/numbers-01" alt="" /li /p pictures /p /section

Hamza, for how to post code, check out this video.

thankyou verymuch

Hi Hamza,

Based on the assumption that your image folder is named images and you are working locally can you try removing the slash from your img src please?

What you have written is correct when used online as it would be referencing the site root but I have a feeling that this may be causing the issue if local.

Thanks

-Rich

<section>
      <ul>
        <li>
          <img src="images/numbers-01" alt="">
          </li>
      </p>Bahi k court me bahram check</p>
    </section>

Missing .png file type