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

HTML Solution: Linking to the Stylesheet

css not working

In index.html i added a link below title tag but its not working for me

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

i also tried other option viewing from the discussion

<link rel="stylesheet" type="text/css" href="css/style.css">

But it's still not working for me

2 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,252 Points

Hi there,

There's a few things I can think of to check.

Does the filename of the CSS file match up to what's in the href attribute? Is the file in the correct location. For example is there a CSS directory with your file in it? Is your <link> located inside the <head> tag in your HTML document?

Without these things the browser won't pick up the CSS properly.

i got it.. everything was fine but it took too much time to get saved.. thanx for the reply.