Print Page Button
Essential for content-heavy sites. This simple one-liner invokes the standard print dialog, making it easy for users to save hard copies of your content.
Copy the Script
<!-- Option 1: Inline -->
<button onclick="window.print()">Print Page</button>
<!-- Option 2: Text Link -->
<a href="javascript:window.print()">Print this article</a>
Frequently Asked Questions
JavaScript prints the whole window by default. To print a specific section, use a CSS `@media print` query to hide everything except the element you want (e.g., `#sidebar { display: none; }`).
Yes. Modern mobile browsers support `window.print()`, usually generating a PDF or sending to a networked printer.
Yes. Use CSS media queries (`@media print`) to change fonts, remove colors, hide ads, and adjust margins specifically for paper output.