HTML and CSS Reference
In-Depth Information
TABLE 10.2
Current HTML 4.01 Table Elements
Tag
Use
Indicates a table.
<table>...</table>
Creates a caption for the table (optional).
<caption>...</caption>
Encloses one or more columns in a group.
<colgroup>...</colgroup>
Used to define the attributes of a column in a table.
<col>
Creates a row group that defines the heading of the
table. A table can contain only one heading.
<thead>...</thead>
Creates a row group that defines the footer of the
table. A table can contain only one footer. Must be
specified before the body of the table is rendered.
<tfoot>...</tfoot>
Defines one or more row groups to include in the body
of the table. Tables can contain more than one body
section.
<tbody>...</tbody>
Defines a table row, which can contain heading and
data cells.
<tr>...</tr>
10
Defines a table cell that contains a heading. Heading
cells are usually indicated by boldface and centered
both horizontally and vertically within the cell.
<th>...</th>
Defines a table cell containing data. Table cells are
in a regular font and are left-aligned and vertically cen-
tered within the cell.
<td>...</td>
Because several of the table attributes apply to more than one of the preceding elements,
I'm listing them separately. Table 10.3 presents a quick summary of the HTML attributes
you learned about in this lesson that remain current in HTML 4.01.
TABLE 10.3
Current HTML 4.01 Table Attributes
Attribute
Applied to Element
Use
Possible values are left , center ,
and right , which indicate the hori-
zontal alignment of the cells within
that row (overriding the default align-
ment of heading and table cells).
align
<tr>
<th> or <td>
Overrides both the row's alignment
and any default cell alignment.
Possible values are left , center ,
and right .
<thead> , <tbody> , <tfoot>
Used to set alignment of the con-
tents in table head, body, or foot
cells. Possible values are left ,
center , and right .
 
 
Search WWH ::




Custom Search