HTML and CSS Reference
In-Depth Information
The following step creates an external style sheet to define how a Web page will print.
@page rules setting
style for printed page
If necessary, click the
Notepad++ button on
the taskbar. Click File
on the menu bar and
then click New.
id named menubar
will not print
Enter the CSS code as
shown in Table 7-8.
styles set for classes
named box (for
paragraphs) and
posit (for images)
on printed page
With the
USB drive
into your
computer, save the file
as printpage.css.
If necessary, navigate
to the Chapter07\
ChapterFiles folder on
your USB drive (Figure 7-14).
Figure 7-14
Print the CSS code.
To Link to an External Style Sheet
The following steps add a link to an external style sheet using a <link> tag and then
save the HTML file.
Click the jaredadam.html tab in Notepad++.
Highlight the comment <!--Insert external style sheet link here --> on line 8.
Type <link rel=”stylesheet” type=”text/css” href=”printpage.css”
media=”print” /> to enter the link to the external style sheet (Figure 7-15).
Save and print the file.
media of style
sheet set to
link to printpage.css
external style sheet
Figure 7-15
Search WWH ::

Custom Search