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

Popular posts from this blog

Displaying a flash message after redirect in Codeigniter

What is required for it startup company ?

how to export html data to pdf in angularjs and javascript