@page
Newly availableSince 202495% of users
An at-rule used to apply styles specifically to printed pages. It lets you set things like page margins, size and orientation for the whole document.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since December 2024. Widely available around June 2027.
See how modern your own CSS is.Check your CSS →
Quick example
@page {
/* Sets a 1-inch margin for all pages when printing */
margin: 1in;
size: portrait;
}
@page :first {
/* Specialized margins for only the first page */
margin-top: 2in;
}@page browser support
BaselineNewly availableSince 2024 this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.Works in all modern browsers. May need a fallback for older browsers.
Usage95%of people can use this5% use a browser without it.
Browsers
2+
19+
18.2+
12+Mobile
18+Android
19+Android
18.2+iOS