CSS background-color property
The background-color
property is what web developers use to place text or elements on a colored canvas. You can set background for any HTML element, e.g., <p>
, <h1>
, <div>
, etc.
To specify color values in CSS, we use the following formats:
• A color name, like yellow
• A HEX value, like #F8DB46
• An RGB value, like rgb(248, 219, 70)