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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Ian Simpson](https://secure.gravatar.com/avatar/e1392a06c7ae1ae2ca3c82a19f6f2b17?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ian Simpson
875 PointsCSS doesnt seem to work on index.html
Hi, I am new to coding and just setting up my first index.html and CSS sheet in workspace. For some reason, no matter how correct i type my CSS and use class, it has no effect on HTML?
I know this is a basic question but do I need to name the CSS sheet for it to have effect on the index.HTML? I have tried everything and nothing seems to work!!
3 Answers
![Rick Gleitz](https://uploads.teamtreehouse.com/production/profile-photos/10566072/micro_highres_446837619.jpg)
Rick Gleitz
47,836 PointsHi Ian,
If you have your CSS in a separate file, make sure its name is style.css. Inside the <head> tags in your .html file, put <link rel="stylesheet" href="style.css"> This is if both files are in the same folder, if not, then you need to put the file path in front of style.css in the href.
You can name your styles file a different name as long as you change the name in the href too (but it must end in .css)
Hope this helps.
![Ian Simpson](https://secure.gravatar.com/avatar/e1392a06c7ae1ae2ca3c82a19f6f2b17?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ian Simpson
875 PointsThanks Rick, this seemed to work as I had to change a certian error round.
Also thanks Gerlin. Seems I was typing in Uk English not American English. Thanks both for the help!!
![Ian Simpson](https://secure.gravatar.com/avatar/e1392a06c7ae1ae2ca3c82a19f6f2b17?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ian Simpson
875 PointsHi,
Thanks for your response. I have tried this and still nothing?
This is the opening text I have in the start of my index.html. I have even tried to add background colour directly into the index.html iteslf and it still doe snot change naything?
<!doctype html> <html lang="en"> <head> <title>Ian Simpson Profile</title> <link rel="stylesheet" href="style.css"> </head>
<body style="background-colour: orange;">
<header>
I am obviously doing something wrong as the guide I have been watching allows me to change anything within the CCS but my project doesnt seem to let me?
Any help with this would be most apreciated as its part of a challenge I am doing and I need to complete the project soon and without this, I am not getting anywhere!!
with thanks Ian
![Gerlin Pierre-Louis](https://uploads.teamtreehouse.com/production/profile-photos/11580165/micro_Screenshot_2022-12-20_234538.jpg)
Gerlin Pierre-Louis
Front End Web Development Techdegree Graduate 21,614 PointsYou have a misspelling. You can do either:
<body style="background-color: orange;">
or
<body style="background: orange;">