CSS: background | background color hex
ThisCSStutorialexplainshowtousetheCSSpropertycalledbackground-colorpropertywithsyntaxandexamples.DescriptionTheCSSbackground-colorpropertydefinesthebackgroundcolorofanelement.SyntaxThesyntaxforthebackground-colorCSSpropertyis:background-color:value;ParametersorArgumentsvalueThebackgroundcoloroftheelement.Itcanbeoneofthefollowing:ValueDescription#RRGGBBHexadecimalrepresentationofthebackgroundcolordiv{background-color:#FF0000;}rgb()RGBrepresentationofthebackgroundcolordiv{background-color:rgb(...
This CSS tutorial explains how to use the CSS property called background-color property with syntax and examples.
DescriptionThe CSS background-color property defines the background color of an element.
SyntaxThe syntax for the background-color CSS property is:
background-color: value; Parameters or Arguments valueThe background color of the element. It can be one of the following:
Value Description #RRGGBB Hexadecimal representation of the background colordiv { background-color: #FF0000; } rgb() RGB representation of the background colordiv { background-color: rgb(255,0,0); } color name Name of the background color (ie: red, blue, black, white)div { background-color: red; } transparent Indicates that the element shows the background-color of the element behind it.The default value for CSS background-color is transparent.div { background-color: transparent; } inherit ...