CSS background color

CSS background color is used to set the color of background of an HTML element.


Syntax

Output

This is the HTML paragraph to show background color property of CSS.


CSS background color values list

Sr. No.valueDescription
1hex color codesUsed to give color code in hex value format. The value for this is #fff, #000 etc.
2rbga color codesUsed to give color code in rbga() format. The value for this can be rgba(255, 0, 0, 0.48), rgba(111, 66, 66, 0.48) etc.
3color nameUsed to give color name. The value for this can be red, blue etc.
4transparentUsed to make a transparent background of an HTML element transparent. The value for this is transparent.
5initialUsed to define as the property initial value.
6inheritUsed to define the computed value of property on the elements parent.
7unsetUsed to set all the properties to their parent value if inheritable.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.