HTML and CSS Reference
In-Depth Information
To Link to an External Style Sheet
The first thing you need to do in this Web page is link to the external style sheet
that contains the overall styles you want this Web page to have.
1
2
Highlight the phrase <!--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.
Remind me, what does this link statement do?
This statement links this Web page to the external style sheet that you created earlier. You need
this link to the external (or linked) style sheet in order to apply those styles to the Web page.
To Add Border Spacing, Padding, and Row Color to a Table
With the tennis.html file open, the HTML code to add border spacing, padding, and row color can be added.
The following step shows how to add border spacing, padding, and decorative color stripes to a table.
1
the right of the e in
the <table> tag on
line 30 and then
press the s p a c e b a r .
Click immediately to
border-spacing
property and value
added on line 30
style=”border-
spacing: 5px;
padding: 5px” as
the properties and
values but do not
press the e n t e r key
(Figure 4-35).
Type
padding property
and value added
on line 30
2
class named
stripe added on
lines 37 and 49
the right of the r in
<tr> on line 37 and
press the spacebar.
Click immediately to
class=”stripe”
and do not press the
e n t e r key.
Type
Figure 4-35
the right of the r in <tr> on line 49 and press the spacebar.
Click immediately to
class=”stripe” and do not press the e n t e r key.
Type
Can I set the padding and border spacing differently for different cells?
With the flexibility of inline styles, you can adjust the border spacing
and padding at the table header or table data cell level.
 
Search WWH ::




Custom Search