<!DOCTYPE html> <html> <body> <p>Click the button to print the current page.</p> <button onclick="myFunction()">Print this page</button> <script> function myFunction() { window.print(); } </script> </body> </html>