HTML and CSS Reference
In-Depth Information
To Link the External Style Sheet
The first thing you need to do in this Web page is link to the external style sheet
that contains the styles that you want for this Web page.
1
2
Highlight the text <!--Insert link statement here --> on line 8.
Type <link rel=”stylesheet” type=”text/css” href=”stylesch4.css” /> to
enter the link to the external style sheet. Do not press the e n t e r key.
To Add a Table Caption
Captions are added to tables using the <caption> </caption> tags to enclose the caption text. The formatting
to make the caption italic and align it at the bottom of the table is included in the external style sheet (stylesch4.css)
that is now linked to this page. The following step shows how to add a caption below the menu table.
1
<!--Insert caption
statement here --> on
line 32.
Highlight the text
inserted link statement
to stylesch4.css, the
external style sheet
with all styles defined
<caption>
Additional menu
items available
upon request
</caption> as the
tag to add the italic
caption below the
table (Figure 4-39).
I Experiment
By default, captions
Type
are aligned at the top
(above) a table. You
changed the style of
the caption in the
external style sheet
to align the caption
on the bottom. To
see what the caption
would look like at the
top of the table, insert
an inline style sheet in
the <caption> tag and use the caption-side property to align the caption at the top.
(Hint: You could also remove lines 33 and 34 in the stylesch4.css file.)
caption element inserted into
Web page; styles for caption will
be taken from the stylesch4.css,
the external style sheet
next step to
insert HTML code
here on line 35
Figure 4-39
To Create the Headings That Span Rows
The following steps illustrate how to enter HTML code to create two headings that each span three rows:
 
Search WWH ::




Custom Search