CSS Print Styles
CSS Print Styles — Create print-friendly web pages with @media print stylesheets, page breaks, and print-specific formatting. The guide walks through Print Styles. `@media print { body { font-size:12pt; } nav, .ad { display:none; } }`. Page breaks: `page-break-before: always`, `page-break-after: avoid`, `page-break-inside: avoid`. Orphans/widows control paragraph breaks. Remove backgrounds, dark themes. Ensure links show URLs: `a[href]:after { content:" (" attr(href)")" }`. The guide is organized into 1 sections that build on each other, each pairing a prose explanation with real CSS you can use as-is. Related guides: CSS Introduction, CSS Selectors, CSS Box Model, CSS Flexbox, CSS Grid. This is one of 68 CSS guides on CSS Reference — see the full list on the guides page. Look up any property mentioned in this guide from the search page or the CSS Reference homepage.