Background color part 2

The Background Color Values



The color of the background can be defined using three different formats: a color namehexadecimal values, and RGB

In the example below, the body, h1, and p elements are assigned different background colors: 

The HTML:<h1>This is a heading</h1>
<p>This is a paragraph</p>

The CSS:
body {
background-color: #C0C0C0;
}
h1 {
background-color: rgb(135,206,235);
}
p {
background-color: LightGreen;
}
Try It Yourself

Result:
Tap Try It Yourself to play around with the code!

Comments

Popular posts from this blog

font-family part 1

Styling the list part 3