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 Getting Started with HTML Global Structure of an HTML Document

Gary Wilson
Gary Wilson
558 Points

I'm not getting the correct output when I preview workspace. How do I fix this?

my code

<!DOCTYPE html> <html> <head> <title>Experienced VR</title> </head>

<body>Experienced VR A simple blog about virtual reality experiences </body> </html>

My output

Index of /

Index.html featured.jpg vr-space.jpg vr-user.jpg

Steven Parker
Steven Parker
231,275 Points

It's probably more about configuration than code. You can make a snapshot of your workspace and post the link to it here to facilitate analysis.

3 Answers

I was having the same problem because my file name wasn't "index.html" so my advice to you is to make sure that your file is called "index.html" and that it isn't inside another folder. Also check over the code to make sure everything is in the right place!

Hope this helps :)

I agree with Steven. There is nothing wrong with the code you posted here. The title and body text you have renders fine for me.

The error you're getting, "Index of /", probably means the browser can't find your html file. Is your index.html file inside of a folder? If it is, take the file out of the folder and try again. Or, write the code path to your file so your browser can find the file and render the webpage properly.

Happy coding!

Yes, I had the same issue as you and I found that, because I capitalized the I in "Index.html" instead of using a lowercase i "index.html", I wasn't getting the appropriate output. When I changed the capitalization, it worked.