B.81. page

The @page at-rule can be given an identifier so that you can declare different page types for use by a site when printing. For example, this style rule sets up a page type named mylandscape:

@page mylandscape {
  size: 11in 8.5in;
  margin: 1in;
  marks: crop;
}

The page property lets you assign a named page type to selected elements. Those elements will then be printed on the specified page type.

Inherited: Yes

B.81.1. Value

An identifier assigned to a @page rule declared elsewhere, or auto.

Initial value: auto

B.81.2. Compatibility

CSS Version: 2

Internet Explorer 5 for Macintosh, Netscape 6, Mozilla, and Opera browsers support this property, but do not actually apply it.

B.81.3. Example

This style rule ensures that all div elements ...

Get HTML Utopia: Designing Without Tables Using CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.