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.

CSS Build a Simple Website Creating a Website Structure CSS Reset

How do I link my css spreadhsheet to HTML from desktop

I have gone through your the HTML modules and now I am on first stages of adding CSS. However I am unsure as to how to link the CSS file (the one called normalize) to my HTML code in Sublime as they are both just files on my desktop. How should I link the normalize.css file (it is currently located in the websitewaters-island folder which I downloaded from the Project Files tab) to my HTML code in Sublime.

1 Answer

Hi Timothy!

If you place the 'normalize.css' file within the main directory file, in your case 'websitewaters-island' you can simply refer to the file as: 'normalize.css'.

If however, you place it within a sub-folder, i.e. 'css' it would be: css/normalize.css

So for example, you would use the following code inside your 'head' tags:

<link type="text/css" rel="stylesheet" media="screen" href="css/normalize.css" />

I hope this helps!