Lesson 3: Working with CSS properties CHAPTER 4 165
- The following style sheet rule is defined in Corporate.css.
div p.highlight{
font-size: xx-large;
background-color: yellow;
}
In Department.css, the following style sheet rule is defined.
div p:first-of-type. {
background-color: blue;
}
Your HTML document contains the following.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link href="Corporate.css" rel="stylesheet" />
<link href="Department.css" rel="stylesheet" />
</head>
<body>
<div id="readingPane">
<p class='highlight'>
Here is a test to see what the background color of a paragraph
will be blue or yellow.
</p>
</div>
</body>
</html>
What will be the rendered background color of the paragraph?
A. Yellow
B. Blue
C. Transparent
D. White
Lesson 3: Working with CSS properties
Now that you know how to use CSS selectors, you can work with CSS properties. There are
many CSS properties, and this lesson discusses the basic CSS properties that you need to
know to provide a page layout.
Colors are explained in detail, followed by measurements and the CSS box model.