HTML and CSS Reference
In-Depth Information
important and typically carry through to the print version. Still, be
liberal with your use of display:none .
Adjust font sizes, line heights, and other typographic properties to
maximize legibility at a typical printed page size.
Contrast is different in print than on the Web, and backgrounds can
make for difficult-to-read pages covered in ink. Hide background
images, change background colors to white, and change text colors
to the darker shades or even black for the best printing and reading
experience.
note Many browsers will drop background images or similar styles when
printing, either by default or by user-selected settings without you
explicitly changing them.
The Print Preview option from your favorite browser will display with any
style sheet targeting the print media type and is a great way to test your
changes to the print presentation without wasting reams of paper.
Hyperlinks and Generated Content
Printed HTML documents do not display information that may be valu-
able to the user to have in that printed form. The destination of hyper-
links is one of the pieces of information lost if only viewing the text.
Generated content can be used to display the contents of the href attri-
bute beside the link text.
@media print {
a:link::after,
a:visited::after {
content: “ (“ attr(href) “) “;
color: #666;
font-style: italic;
 
 
Search WWH ::




Custom Search