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

greg Schackert
greg Schackert
46 Points

WANT CSS IN H1 TO CHANGE FONT COLOR

HELP WITH CSS SELECTOR AND PROPERTY

index.html
<h1>Nick Pettit</h1>
H1SPACE{ GREEN; BLUE;}

3 Answers

Aurelian Spodarec
Aurelian Spodarec
10,801 Points

Re-watch the video.

you select h1 by writing

h1{
   values
}
Jason Anders
Jason Anders
Treehouse Moderator 145,860 Points

Hey greg Schackert

I absolutely agree with him. Based on your submitted answer, I strongly suggest you review the video before proceeding with the course. In fact, Computer coding and CSS can be very complex. Therefore, I actually recommend completing the Digital Literacy Track before moving on. This track will give you the basics needed to progress nicely through the other tracks/courses.

Keep Coding! :) :dizzy:

Jacob Herrington
Jacob Herrington
15,835 Points

Any already existing element such as a div, h1, p, span, etc. can be selected in CSS simply by typing the element name followed by opening and closing curly braces:

h1 {
    color: white;  /* this is the attribute to change font color */
}

For more you can refer to this documentation, be fair warned, CSS selectors can get very complicated (and cool) quickly!

greg Schackert
greg Schackert
46 Points

THANK S FOR THE HELP

Jacob Herrington
Jacob Herrington
15,835 Points

No problem! Make sure to really understand how CSS selectors work and what a CSS rule is - understanding these basics is the only way to progress with this stuff.