CSS size Property


The size property specifies the target size and orientation of the page box's containing block. In the general case, where one page box is rendered onto one page sheet, the 'size' property also indicates the size of the destination page sheet.

The size property has been deprecated or is no longer in any CSS working groups.

Initial value
Applies to
Page content
Computed value
Specified value
JavaScript syntax


size: <length>{1,2} | auto | [ <page-size> || [ portrait | landscape] ]


  • <length>The page box will be set to the given absolute dimension(s). If only one length value is specified, it sets both the width and height of the page box (i.e., the box is a square). If two length values are specified, the first establishes the page box width, and the second the page box height.
  • autoThe page box will be set to a size and orientation chosen by the browser.
  • lt;page-size>A page size can be specified using one of the following media names: A5, A4, A3, B5, B4, letter, legal and ledger
  • portraitSpecifies that the page's content be printed in portrait orientation.
  • landscapeSpecifies that the page's content be printed in landscape orientation.


.class {
   size: 25px 54px; 

Browser Support

The following table will show you the current browser support for the CSS size property.

Edge Chrome Firefox Opera Safari
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview