Thư viện tri thức trực tuyến
Kho tài liệu với 50,000+ tài liệu học thuật
© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

The Best-Practice Guide to xHTML and CSS phần 9 ppt
Nội dung xem thử
Mô tả chi tiết
254 | Appendix A: XHTML Reference
This example shows a table with three rows with three cells in each row, making it a
3x3 table.
Related Tags
tr, th, table
<textarea></textarea>
Creates a multiline text area form field. The initial value of the text area can be
placed in between the opening and closing tags.
See Chapter 9, “Forms.”
Attributes
[Common attributes]
rows (required)—The number of viewable rows.
cols (required)—The number of viewable columns.
name—Used so that the value of the element can be processed.
disabled—Disables an element. It must be used in the format
disabled=”disabled”.
readonly—Used to specify that the value of the element cannot be changed. It
must be used in the format readonly=”readonly”.
accesskey—Associates a keyboard shortcut to the element.
tabindex—Where the element appears in the tab order of the page.
Content
Text.
Example
<form action=”somescript.php” />
<p>Your address</p>
•
•
•
•
•
•
•
•
Tags | 255
<div><textarea name=”address” cols=”30” rows=”4”></textarea></
div>
<div><input type=”submit” /></div>
</form>
Related Tags
input, form
<tfoot></tfoot>
Table footer row group. Along with thead and tbody, tfoot can be used to group
a series of rows. tfoot can be used just once within a table element and must
appear before a tbody element.
See Chapter 8, “Tables.”
Attributes
[Common attributes]
Note: There are other valid attributes (align, valign, char, charoff) but they are
presentational and so CSS should be used instead.
Content
One or more tr.
Example
<table>
<thead>
<tr>
<th>Header 1</th>
<th>Header 2</th>
<th>Header 3</th>
</tr>
</thead>
<tfoot>
<tr>
•
256 | Appendix A: XHTML Reference
<td>Footer 1</td>
<td>Footer 2</td>
<td>Footer 3</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>Cell data 1</td>
<td>Cell data 2</td>
<td>Cell data 3</td>
</tr>
<tr>
<td>Cell data 4</td>
<td>Cell data 5</td>
<td>Cell data 6</td>
</tr>
<tr>
<td>Cell data 7</td>
<td>Cell data 8</td>
<td>Cell data 9</td>
</tr>
</tbody>
</table>
Related Tags
thead, tbody, table
<th></th>
Table header cell. Must appear within a tr element.
See Chapter 8, “Tables.”
Attributes
[Common attributes]
colspan—Specifies across how many columns the cell should spread. The
default value is 1.
•
•
Tags | 257
rowspan—Specifies across how many rows the cell should spread. The default
value is 1.
abbr—An abbreviated version of the content of the cell.
headers—Explicitly specifies which header cells are associated to the cell. The
value is a single or comma-separated list of table cell id values.
scope—Explicitly specifies that the cell contains header information for the
rest of the row (value row), column (value col), row group (value rowgroup), or
column group (value colgroup) that contains it.
axis—A category that forms a conceptual axis in n-dimensional space for hierarchical structuring. The value can be a single name or a comma-separated
list of names.
Note: There are other valid attributes (align, valign, char, charoff) but they are
presentational and so CSS should be used instead.
Content
Text, block, inline, or none.
Example
<tr>
<th>Cats</th>
<th>Dogs</th>
<th>Lemurs</th>
</tr>
Table header cells can also be used as headers for rows, for example if you had
your table structured like this:
<table>
<tr>
<th>Cats</th>
<td>Tiger</td>
<td>Cheetah</td>
</tr>
<tr>
•
•
•
•
•