HTML and CSS Reference
The following step illustrates how to create a table with borders and insert text into heading and data cells.
With the insertion point on line 30,
enter the HTML code for the Golf
table, as shown in Table 4-9, using
t a b to create indents, and pressing
e n t e r after each line except the
last line (line 63) (Figure 4-29).
Are there other attributes that can
be used in the <table>, <tr>, <th>,
and <td> tags?
Most table attributes are no longer
supported by HTML5. You can still
change the style of tables by using
Cascading Style Sheets as is done
in this chapter project.
one row of three table heading
<th> cells; contained between
start row <tr> and end row
stripe class name used
to color every other row
four rows of table data <td>
cells between start row <tr>
and end row </tr> tags
Why are we using a white font
color for the headings?
Because the background color is so
dark (#757775), you could not eas-
ily read the heading if it was the
default color of black. Changing
the font color to white on a dark
background color makes it easier
To Save, Validate, View, and Print the Web Page
After adding the remaining HTML code, perform the following steps to save,
validate, view, and print the Golf Web page.
In Notepad++, save the golf.html file.
Click the Internet Explorer button on the taskbar.
Use the W3C validator service to validate the golf.html Web page.
Return to Notepad++ and print the golf.html Notepad++ file (Figure 4-30).
Return to the Oceanside's home page, click the Golf link to show the most recent file,
and then print the Web page, as shown in Figure 4-31 on the next page.