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!

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

Willie Suggs
PLUS
Willie Suggs
Courses Plus Student 5,879 Points

how to add css to workspace?

ok, so I'm trying add css to my project in an workspace but it won't work. i added a new css folder then i added a homepage.css file but the css i put in the file won't change anything in my html. like i did simple stuff like try to change text color & stuff h1{ color: red;} but it won't change anything. what do i have to do?

1 Answer

Tanja Schmidt
Tanja Schmidt
11,798 Points

Have you linked your CSS-File to your HTML-File?

In case you haven't: You need to link it within the <head> like this (if your CSS-Folder is named CSS):

<head>
<link rel="stylesheet" href="css/homepage.css">
</head>

Hope, this helps! :)