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 Introduction to HTML and CSS (2016) Getting Familiar with HTML and CSS Test: Changing the Look of a Web Page

how to change the color of h1

how do i change the color of an h1?

2 Answers

Konrad Pilch
Konrad Pilch
2,435 Points

You need to select the h1 tag in the CSS, and then you can style it however you want.

You start by selecting it, in this hase h1, and after that put {} . Whatever goes between them, if its valid, the CSS will make it work. The left side , you write there e.g. color, background, height etc.. and on the right side you say what you want it to be, bold, 100px, italic, red, #02hd92; whatever.

anil rahman
anil rahman
7,786 Points

use css

h1 {
   color: red;
}