CSS color Property

The background-color property in CSS is used to specify the background color of an element. The background covers the total size of the element with padding and border but excluding margin. It makes the text so easy to read for the user.


The syntax of the property is given with:

color color | initial | inherit

Supported Browsers: The browser supported by css background-color Property are listed below:

  • Chrome 1.0
  • Internet Explorer 4.0
  • Firefox 1.0
  • Opera 3.5
  • Safari 1.0

Example -