HTML & CSS · Middle · Question 50 of 75
How do you properly include print-only styles?
- ✓Correct answer: A
media="print"attribute on<link>or an@media printblock - 2Call
window.print()- it will load the print styles - 3Specify the style type:
<style type="print">
Explanation
media="print" and @media print apply styles only when printing: hide navigation and ads, remove backgrounds, show link URLs via a::after { content: " (" attr(href) ")" }, control page breaks with break-inside: avoid. window.print() only opens the print dialog.