TAG
CSS
JavaScript
Result
Run
License
<p> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. </p> <p> It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. </p> <button type="button" id="btn-print">Print</button>
@page :right { margin-left: 50%; margin-top: 50%; } p { break-after: page; }
window.addEventListener("load", () => { const elBtn = document.getElementById("btn-print"); elBtn.onclick = () => window.print(); });
Console
expand_less
License
License
by DevDic
Close