Chapter 37. Media Styles and Defining Documents for Printing


  • Understanding CSS media types

  • Setting up documents for printing

  • Creating a multimedia document

The Web was originally designed to bring printed media to the computer screen. Paragraph elements, list elements, and tables were all designed to provide adequate vehicles for approximating documents normally found in print.

As times have changed, this situation has somewhat reversed. Now documents that originated on the Web are being formatted for the printed page. This phenomenon is especially true for such documents as e-commerce invoices, calendars and events, and documents of directions — whether they be do-it-yourself instructions or directions to a popular venue.

Of course, printed documents are not the only secondary destination for Web-originated documents; Web documents are also being made available to aural (speech only) devices, presentation and handheld devices, and low-resolution Web browsers (such as WebTV).

Thankfully, CSS has several mechanisms for formatting a document for these various media types. This chapter concentrates on the print media type, but many of the techniques discussed translate to other media types, as well.

Understanding CSS Media Types

Table 37-1 lists the various media types supported in CSS.


Because of the rapidly evolving deployment of Web documents to other media types, the preceding list (specified in CSS2) is not designed to be all-inclusive. The list is amended from time ...

Get HTML, XHTML, and CSS Bible, Fourth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.