Contact Us | +1 888 239-0733 (Toll free US/CA) Mon-Fri: 7:30am to 4:30pm (PST)
The CSS 'background-color' property sets an element's background color. This color covers the element's content and padding areas, and if the border is transparent (such as a transparent border or no border), it will extend beneath the border as well. The 'background-color' property is a fundamental aspect of web design, allowing for color customization of almost any element on a webpage.
See the Pen
CSS 'background-color' Property by Webzstore (@webzstore)
on CodePen. The 'background-color' property is a versatile tool in CSS, enabling developers and designers to easily customize the appearance of elements and improve the user interface of web projects. This property defines a solid color for an element's background. It's widely applied for purposes ranging from setting the color of text containers to defining hover states for interactive elements to creating colored backgrounds for sections or entire web pages. The 'background-color' property can accept any valid CSS color value, including named colors, HEX codes, RGB(a), and HSL(a) values.Browser Support For 'background-color' Property
1.0 1.0 1.0 4.0 3.5 CSS Syntax of the 'background-color' Property
background-color: color | transparent | initial | inherit;
Usage of the 'background-color' Property
Property Values of the 'background-color' Property
"*" indicates required fields