@page

HTML (DHTML)

@page Rule

Internet Development Index

Sets the dimensions, orientation, and margins of a page box in a styleSheet.

Syntax

HTML@page sPageSelector { sRules }
ScriptingN/A

Possible Values

sPageSelector String that specifies one of the following page types:
:firstRule applies to the first page in the collection.
:leftRule applies to pages on the left side of the binding—verso pages.
:rightRule applies to pages on the right side of the binding—recto pages.
sRulesString that specifies one or more rules in a styleSheet.

Remarks

The rule has no default value.

The page box is a rectangular region that contains two areas, the page area and the margin area. The page area contains the page's contents, such as text and graphics, and the margin area surrounds the page's contents.

Although @page rules are represented in the Cascading Style Sheets (CSS) object model in Microsoft® Internet Explorer 5.5 and later, the rules are not used by the default print template for Internet Explorer. The rules can be used by print templates developed for applications that host MSHTML. Attributes such as size and margin, which are not explicitly supported, are exposed as expando properties in these applications.

Standards Information

This rule is defined in CSS, Level 1 (CSS1) Non-Microsoft link.

See Also

@media, page, pages, Print Templates