size attribute

Type:paper size
Inherited:no
Used By:pagenumber, totalpages, All block elements
Default:For BODY, if the locale is en_US or en_CA, "letter". Otherwise it's "A4". For other elements, there is no default value. For PAGENUMBER and TOTALPAGES, this value detemines the number of digits to allow for, and defaults to 3.
See:height id width

For most elements, allows the width and height of an element (usually a page, but theoretically any block) to be set to a standard value. For example, the following two lines are equivalent:

<body width="210mm" height="297mm">

<body size="A4">

Valid values are:

For any one of these sizes, the suffix "-landscape" can be attached to reverse the width and height components.

For the pagenumber and totalpages elements, this attribute sets the number of digits to allow space for in the paragraph. This is only really required when the paragraph is right aligned. The default is "3", to allow space for three digits in the page number.

Set the body of the document to 297mm wide by 210mm high

body { size:A4-landscape; }

For documents of less than ten pages, the PAGENUMBER and TOTALPAGES elements can have their size set like so:

Page <pagenumber size="1"/> of <totalpages size="1"/>