background-color in CSS
The 'background-color' property
The
background-color
property describes the background color of elements.
The element
<body>
contains all the content of an HTML document. Thus, to change the background color of an entire page, the background-color property should be applied to the <body>
element.
You can also apply background colors to other elements including headlines and text. In the example below, different background colors are applied to
<body>
and <h1>
elements.
body {
background-color: #FFCC66;
}
h1 {
color: #990000;
background-color: #FC9804;
}
Comments
Post a Comment