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



my css thing that I'm making myself is just showing this:

Index of /

PetFacts.html style.css.

how do I get this to work?

can you post the head tag of your HTML, there is probably an issues with linking your css, and your html.

<title>Pet Facts</title>
 <link rel="stylesheet" href="style.css">

there it is.

Caleb Kleveter
Caleb Kleveter
Treehouse Moderator 37,862 Points

What does your file tree look like? Make sure that index.html is not in a folder.

no, it is not.

It does not look like you have an index.html file.

what do you mean?

this is what my tree looks like

Pet Facts (the name of the thing i'm making)

css (a folder)


index.html(not in the folder, it also used to be PetFacts.html)

if you want to see for yourself, see this,


1 Answer

It looks like your problem might be that you don't have a file specifically named "index.html" all lowercase. You have a file named "PetFacts.html" This would be fine for a sub-page of your site but the main home page of your site should be named "index.html"

I don't know if you're using workspaces but when you preview your site the server is looking for an "index.html" file and if it doesn't find one then it will list the directory contents. That is what it looks like is happening with you. It's showing that you have an html and css file in that directory.

If this is the case then renaming your file to "index.html" should solve your problem.

If you're using workspaces then you can post a snapshot of your workspace and that would make it easier to track down the problem.

I also just put a link in.

Workspace links don't work.

Here's some info on taking a snapshot: https://teamtreehouse.com/forum/workspace-snapshots

The snapshot icon is near the preview icon.