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 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
210,936 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 :)

joelearner
joelearner
54,670 Points

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.