background
is a valid colour in CSS. It differs per browser; it's a shade of purple in chromium. I can't find any information on it and was wondering why it exists and what it is.
.test {
height: 200px;
width: 200px;
background-color: background;
}
<div class="test"></div>
The background-color property sets the background color of an element. The background of an element is the total size of the element, including padding and border (but not the margin). Tip: Use a background color and a text color that makes the text easy to read.
Introduction. The attribute that is used to set background color of an HTML element is bg color. Depending on the element whose background color is to be set, we use the appropriate tag. The bgcolor attribute can be used with the following tags- body, table, td, th, tr, marquee.
It refers to one of the CSS2 system colours, now deprecated.
Note that you get the same result with Background
, as it's listed in that documentation; CSS is case insensitive, I think they're just listed in CamelCase
to make the word boundaries clearer.
.test {
height: 200px;
width: 200px;
background-color: Background;
}
<div class="test"></div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With