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

Preview Not Showing Correctly

Hi there, I'm following the tutorial but when I click preview it doesn't work. Below is my code:

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Nerinna Valera | Photographer</title> </head> <body> <header> <a href="index.html"> <h1>Nerinna Valera</h1> <h2>Photographer</h2> </a> <nav> <ul> <li>Portfolio</li> <li>About</li> <li>Contact</li> </ul> </nav> </header> <section> <ul> <li> <img src="img/numbers-01.jpg" alt=""> </li> </ul> </section> <footer> <p>Ā© 2015 Nerinna Valera</p> </footer> </body> </html>

When I click preview it shows the following:

Index of /

img/

2 Answers

Are you following along in Workspaces or locally on your computer?

The code you provided above works for me in Workspaces. The result you're getting suggests to me it's probably an issue with your local setup/folder structure. Looks like you might be looking at the folder containing all the files (the root folder). Are you clicking on the index.html file in order to preview the project?

Antonio English
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Antonio English
Front End Web Development Techdegree Graduate 18,103 Points

here's my code:

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Antonio English | Designer</title> </head> <body> <header> <a href="index.html"> <h1>Antonio English</h1> <h2>Designer</h2> </a> <nav> <ul> <li><a href="index.html">Portfolio</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav> </header> <section> <ul> <li> <img scr="img/numbers-01.jpg" alt=""> </li> </ul> </section> <footer> <p>Ā© 2015 Antonio English.</p> </footer> </body> </html>

Antonio, I had the same problem. It turns out I accidentally put the index.html file in the image folder. If you drag out your index.html file out of the image folder and down from the image folder, close Workspaces then re-open, it should work then. :)