CSS

CSS Intro

CSS Intro Quiz

CSS Intro Exercise

CSS Basic

CSS Basic Quiz

CSS Basic Exercise

CSS Advance

CSS Advance Quiz

CSS Advance Exercise

CSS3

CSS3 Quiz

CSS3 Exercise

CSS Properties

CSS Functions

CSS Selectors

Background Color in CSS

The background-color Property

 

 

The background-color property is used to specify the background color of an element. It uses three different color formats i.e, color name, hexadecimal values, and RGB.

 

Syntax:-

 

Its syntax is:-

< style >

element {

background-color: color| transparent| initial| inherit;

}

< /style >

 

Further Explanation:-

 

Value Description
color Specifies the background color.
transparent Specifies that the background color should be transparent.
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Code Explanation

All Tutorials related to CSS Advance

All Sections related to CSS