HTML and CSS Reference
In-Depth Information
To Add an Embedded Style Sheet
Table 6-11 shows the HTML code to add an embedded style sheet to format the
legends for the form fields.
Table 6-11 HTML Code to Add an External Style Sheet
Line
HTML Tag and Text
7
<style type="text/css">
8
<!--
9
10
legend {float: left;
11
color: #0000fe;
12
font-style: italic;
13
font-size: small;}
14
15
-->
16
</style>
The following steps add an embedded style sheet to the Web page form.
1
Highlight the statement <!--Insert embedded style sheet here --> on line 7.
2
Enter the HTML code shown in Table 6-11, but do not press the e n t e r key on line 16
(Figure 6-24).
float property
added for
alignment
color #0000fe
(blue) added
start style
tag on line 7
embedded style
sheet added to
enhance legends
end style tag
font style and
size altered
Figure 6-24
 
Search WWH ::




Custom Search