Check out a free preview of the full CSS In-Depth, v2 course:
The "Background Properties & Color" Lesson is part of the full, CSS In-Depth, v2 course featured in this preview video. Here's what you'd learn in this lesson:

Overview of the background properties and acceptable values for background color.

Get Unlimited Access Now

Transcript from the "Background Properties & Color" Lesson

[00:00:03]
>> Estelle Weyl: Next section we're going to do is backgrounds and borders. So, if you're following along, the url is estelle.github.io/cssmasteries/borders. If you lose your place, just remember my first name is Estelle, and just go to my github estelle.github.io. Then select the CSS mastery class and then it's got under borders with an s.

[00:00:27] So we're gonna be talking be talking about background and borders. And these are the properties we're gonna cover. There's some background properties, of background-color, background-image, background-repeat, background-attachment, background-position, background-clip, background-origin, background-size, and background-shorthand. And then there's the border properties, which you probably know, of border-color, style, and width, and the border shorthand.

[00:00:51] And then there's also the border-radius. But then there's also something called border images, which most people don't ever use, so I just wanna introduce it. And you don't need to memorize the features of it, but it's just to give you a quick little overview, so if you ever do find yourself thinking, that might not be a bad idea.

[00:01:08] There's border-image-source, border-image-slice, width, outset, repeat. And then the shorthand. So let's start with the background properties.
>> Estelle Weyl: Okay. The first background property we're gonna cover is background-color. And there's nothing new to learn here. We already went through the colors earlier yesterday, and there was a color section, so you can always look there.

[00:01:39] But basically, for background color, you can use any color type you want. Name colors, hexadecimal with three, six, or eight values. RGB, RGBA, HSL, HSLA. You can use a code transparent, which is the default. And then, there would be no reason to actually use this, but you could use current color.

[00:02:01] Can anyone think of why current color background color would be really bad idea? Yeah. But if you wanted to just April fools, you can do things like, star background color, current color important. And then no one could read any of your sites. Or maybe you could do that as your last parting check-in after you get fired.

[00:02:23] I don't know, I'm kidding. Okay. So there's nothing new here. If any of this looks confusing to you, just go and look at the deck on colors that we did here earlier.