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 HTML Basics Images, Text and Links Adding Images to the Page

Miriam Allman
PLUS
Miriam Allman
Courses Plus Student 1,761 Points

Why doesn't my image show in my page

This is the code I used but my image does not show up in my Experience VR page. <section> <h2>About this site</h2> <p> Lore ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse vehicula meus in bibendum laoreet. Aenean livero est, egestas eu eros pretium, sodales iaculis est.</p> <img src="src=img/vr-space.jpg" alt=User experiencing space in VR" title="Virtual reality users can explore faraway places and feel as though they are right in the middle of the action"> </section>

My image is called vr-space.jpg . it is in a sub folder

2 Answers

Dave StSomeWhere
Dave StSomeWhere
19,870 Points

You have syntax errors in your <img ...> element. <img src="src=img/vr-space.jpg" alt=User experiencing space in VR" title="Virtual reality users can explore faraway places and feel as though they are right in the middle of the action">

Notice the extra src= in the src attribute and the missing double quote at the beginning of the alt attribute.

Manish Giri
Manish Giri
16,266 Points

Your img attribute is wrong - <img src="src=img/vr-space.jpg"

It should be <img src="img/vr-space.jpg" ... >