In this lesson, you will learn how to style a page for print using CSS. You will also learn about the media type and how it is used.
In the past, many sites provided two versions of each page—one designed for the screen and the other designed to be printed. The two versions generally used the same content, but were presented in different ways.
One advantage of CSS is that you can style a page for print without the need for additional pages. This is achieved using the
media attribute, which can be applied to external style sheet links (as shown in Listing 20.1) or to the
style element for embedded styles (as shown in Listing 20.2).
Example 20.1. HTML Code Containing a Link to an External ...