page-size-003

@page size A4

WeasyPrint

This browser

Flags
paged
Assertion
The 'A4' value of the 'size' property specifies that the page box's width be 210m and its height 297mm.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3  <head>
 4   <title>CSS Test: @page size A4</title>
 5   <link rel="author" title="Tom Clancy" href="mailto:tclancy@revenution.com">
 6   <link rel="author" title="Hewlett-Packard Company" href="http://www.hp.com/">
 7   <link rel="help" href="http://www.w3.org/TR/css3-page/#page-size-prop">
 8   <meta name="flags" content="paged">
 9   <meta name="assert" content="The 'A4' value of the 'size' property specifies that the page box's width be 210m and its height 297mm.">
10   <style type="text/css">
11 	@page {
12 		size: A4;
13 		border: 2pt solid black;
14 		margin: 20mm;
15 	}
16   </style>
17  </head>
18  <body>
19   <div>If A4 (210mm x 297mm) or larger paper is available, this content should be printed in a black box that has a width of 170mm and a height of 257mm.</div>
20  </body>
21 </html>