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 trialJustin Luberda
436 PointsIn the beginning of the project we use index.html. If i was creating my own project, what do i put instead?
In the beginning of the project we use index.html. If i was creating my own project, what do i put instead and does the anchor element work the same? What about where the main.css file is? does that matter as well or do i save all these files to one folder on my desktop?
2 Answers
Nick Pfisterer
8,064 PointsIf you recreate the website in a folder on your desktop, the file structure should be the same as in the Workspaces project. The index.html file is always used as the home page for your website. This is true whether your website files are in a folder on your desktop or on a live server somewhere.
Cristian Ambæk
Courses Plus Student 415 PointsAtt. Justin Luberda Im not new to HTML but just started to use the tree house service to simply test it out, but so far i'am not impressed. To answer your question, when you load a website (any website) you automatically request the default webpage hosted on that website. This webpage is ALWAYS the index.html or index.htm file.
So for every project you create, will always have a index.html or index.htm file in the root of your directory.
It does not matter where you place your .css file even tho its common to save it in a sub directory called CSS or along those lines. In your different something.html pages you than link to the CSS file that has the responsibility for the layout.
Example < link rel="stylesheet" type="text/css" href="CSS/something.css"/>
Note their is a space between < and the letter l in link. If i dont place that their the editor (i believe) think its html code and dont display it in the answer. Remove that if you are going to test the example.