concept

Page area — CSS reference

The page box content region that receives document fragments. The first page area establishes the initial containing block in paged media. With this page size and margins, the intended content area is 220 by 320 CSS pixels.

Formal Syntax & Structure

css syntaxcss
@page { margin: 40px; }

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>Page area</title><style>body{margin:0}#a{padding:8px;background:rgb(232,237,241);color:rgb(0,0,0);box-sizing:border-box}p{margin:0;font:12px/16px sans-serif}.next{break-before:page}@page{size:300px 400px;margin:40px;}</style><body><main><p>BODY</p></main></body></html>
CSS Reference