Background
HTML Background Colour Code
Choose a colour and copy the CSS to set it as an element's background.
Live Tool
bg-color.css
Live
Preview
1How To Use
Follow these steps — no coding experience needed.
- Pick a colourUse the swatch or type a hex code.
- Copy the CSSOne line — works on any element.
- Apply itAdd it to a class, an ID, or directly as an inline style.
2Example Output
What this code looks like once it's on a real page.
A light tint background, often used for cards or callouts.
3Browser Compatibility
| Browser | Support | Notes |
|---|---|---|
| Chrome | ✓ Supported | Full support |
| Firefox | ✓ Supported | Full support |
| Safari | ✓ Supported | Full support |
| Edge | ✓ Supported | Full support |
| Opera | ✓ Supported | Full support |
| Mobile browsers | ✓ Supported | Full support, iOS & Android |
Supported in every current browser — Chrome, Firefox, Safari, Edge and Opera all render this identically, on both desktop and mobile.
→Related Pages
More tools that pair naturally with this one.