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

CSS CSS Foundations Selectors Type Selectors

CSS linking to HTML

I like to open up my own text editor documents on one monitor and follow along with the video's on another, but for some reason I cannot l get my css to link to the html, so I when I refresh the page, it doesn't work out for me.

<link rel="stylesheet" href="*C:\Users\hmaxfield\desktop\style.css">

This is the exact file path. Helpppppp.

4 Answers

Salmen Bejaoui
Salmen Bejaoui
8,017 Points

Are the css file and the index.html in the same folder ?

I have the same problem: I have created a folder called Treehouse in which there are two things: the first is a file saying index.html and then the other is the folder websitewaters-island01-stage03 . Is what you mean by are the css file and html file in the same folder?

I fixed it! I had an error in the file path. :p

thanks!

I fixed it! I had an error in the file path. :p

thanks!

John Breiner
John Breiner
6,918 Points

As a sidenote, it's a whole lot better to use relative links as opposed to absolute links like you've done. The reason being is if you move things it breaks the link. With relative, as long as you maintain the file structure for your website, your link will still be good.