Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML HTML Basics Going Further with HTML Root-relative Paths

Charlene Janzen
Charlene Janzen
9,807 Points

Trouble with Preview

When I go to preview, I get an index of the folders and files instead of the web preview. I can preview from that directory, but my links and images don't work. I ignored it at first, but I'm using this workspace a lot longer than I realized and I need a solution now.

Cameron Childres
Cameron Childres
11,769 Points

Hi Charlene,

This can happen for a few reasons, such as index.html being renamed or files and folders being moved around. Can you post a snapshot of your workspace so I can have a look?

To post a snapshot click the camera icon in the top right and select "take snapshot". Click the link it generates and copy and paste it here. That way I'll be able to view the current state of your workspace and see what's going on.

2 Answers

Cameron Childres
Cameron Childres
11,769 Points

It looks like the issue is with capitalization of the file and folder names. They have to match exactly or they won't link up -- "Img/vr-space.jpg" is not the same as "img/vr-space.jpg".

Rename them to be lower case and you should be good to go:

  • Articles --> articles
  • Img --> img
  • Index.html --> index.html
Charlene Janzen
Charlene Janzen
9,807 Points

Thank you SO much. It worked to change the folders, though I couldn't get the file Article.html to rename.