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 How to Make a Website Beginning HTML and CSS Write a CSS Selector and Property

Hamzah Iqbal
PLUS
Hamzah Iqbal
Courses Plus Student 2,529 Points

Basic: Where to put color:green at?

This is basic but i don't know where to put color:green at.

isnt it like this:

Well, arent you supposed to write it like: <style> { <h1> color:green Name } </style>

<h1>

name

</h1>

etc etc

3 Answers

Logan R
Logan R
22,989 Points

When you write a selector, you start with your html element.

h1 {

}

You then write your CSS in there.

h1 {
    color: green;
}

You can add other things to change the H1 too.

h1 {
    color: green;
    font-size: 24px;
    font-weight: bold;
}

It would go in your css file (I believe it's called main.css ) and if I remember correctly it's supposed to be applied to either the body or the footer. So code in your css file would look like this...

body {
    color: green;
}

or

footer {
    color: green;
}

Sorry - posted this as a comment instead of an answer