property

CSS background-color

Paints a color beneath an element’s background images. Its default is transparent, allowing underlying painting to show through. It does not inherit; clipping and transparency affect the visible result.

Formal Syntax & Structure

css syntaxcss
background-color = <color>

Parameters & Attributes

NameTypeDescription
color<color>The background paint color.

Working Example

Example Snippetcss
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>CSS reference demo</title><style>#sample { background-color: #eef4f8; color: #184168; }</style></head><body><p id="sample">Field <span id="child">note</span></p></body></html>
CSS Reference