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

CSS

Change background color

How can I change background color of ENTIRE webpage?

3 Answers

Before you start asking which of the answers mentioned above is correct. Both of them. You can use

body { background-color: green; }

or

body { background: green; }

They do exactly the same.in this case. But in general the property background has more options. With background you can set an image as background-image, set the background-color and much more. Background-color only set a new color.

Most likely go

Body { Background-color: #color; }

You just need to target the body element in CSS.

body { background: #6495ed; }