HTML and CSS Reference
In-Depth Information
Figure 3-2 The page with a background image applied to it.
If you've had a good look through the project files, you may have noticed that the image bg-body.jpg is small (only
40 × 40 pixels), yet the background image when viewed in the browser covers the whole page. The reason is that a
background image, by default, repeats, so when viewing the page in a browser, the background image is repeated
multiple times to cover the whole page. More on background images in Chapter 5.
Inheritance and the Relationship Between Elements
Just before you begin selecting elements to style, it's a good idea to understand CSS inheritance and the relationship
between elements.
When applying a style to an element, depending on the property being used, that style may be inherited by other ele-
ments. The following rule set makes text in the <body> element blue:
body {
color: blue;
}
Search WWH ::




Custom Search