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
Sophia Su
1,025 PointsChange background color
How can I change background color of ENTIRE webpage?
3 Answers
Manuel Schulze
12,739 PointsBefore 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.
jdh
12,334 PointsMost likely go
Body { Background-color: #color; }
Nicholas Green
26,327 PointsYou just need to target the body element in CSS.
body { background: #6495ed; }