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

Sian WIlliams
Sian WIlliams
1,213 Points

How to preview my own coding using workspace?

I want to use the coding I've been learning (html & css) into practice and use the workspace to do this. But when I preview my code I get an 'index of' page. I emailed support and they said it's all working? and to try asking on here. I remember something about adding something into the console? But I can't remember what it is, or where the video is about it.

2 Answers

Steven Parker
Steven Parker
231,269 Points

By default, the preview will show "index.html" if one is present, or the directory ("index of" page) if it is not. Make sure your HTML file has that name.

If that's not the issue, you can make a snapshot of your workspace and post the link to it here, then we can take a closer look.

Steven Parker
Steven Parker
231,269 Points

You have an "index.html" file, but it is currently in the "pages" subdirectory. Move it to the main directory and it will be displayed when you start the preview.

Fran ADP
Fran ADP
6,304 Points

see if your html file has the name.