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

Siddharth Gupta
Siddharth Gupta
111 Points

how to change color of headings ??

question is <h1>welcome to my web page <\h1> i want to change color fro this headings

<!doctype html>
    <link href="styles.css" rel="stylesheet">

    <h1>Welcome to My Web Page!</h1>


Hai siddharth, this is the code

h1 { color: blue; }

You can use which color you want to apply. Happy coding.

2 Answers

Oleg Kuperman
Oleg Kuperman
2,188 Points

You don't really change the color of the heading, since there isn't anything in your heading. You could, if you had an object. But if you are trying to change the color of the h1 tag (<h1>Welcome to My Web Page!</h1>)

That would be done, by adding this into your styles.css sheet

h1 { color: red; }

unless there is something else that you were looking for. :)

Gustavo Winter
Gustavo Winter
Courses Plus Student 27,382 Points

Hi, you cant change the heading color, you only can change the colors of elements. <h1> / <h2>/ <h3> .... <section> / <div>.....

You will need to open a css code to make this change.

Search for this course : "how-to-make-a-website". There you will see how this change is made.