HTML HTML Basics Going Further with HTML Root-relative Paths

Charlene Janzen
Charlene Janzen
9,420 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
Treehouse Moderator 11,545 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
MOD
Cameron Childres
Treehouse Moderator 11,545 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,420 Points

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