HTML and CSS Reference
In-Depth Information
Table A-3 HTML Tags and Attributes
(continued)
HTML Tag and Attributes
Description
<td>….</td>
(continued)
bgcolor=
color
**
Defines the background color for the cell
char=
character
**
Specifies a character on which to align column values (for example, a
period is used to align monetary values)
charoff=
value
**
Specifies a number of characters to offset data aligned with the character
specified in the char property
colspan=
value
Defines the number of adjacent columns spanned by the cell
headers=
header_id
Defines the list of header cells for the current cell
rowspan=
value
Defines the number of adjacent rows spanned by the cell
scope=
option
**
Specifies cells for which the element defines header cells
valign=
position
**
Sets vertical alignment of cells in the group
width=
pixels, %
**
Sets the width of the table in either pixels or a percentage of the whole
table width
<textarea>….</textarea>
Creates a multiline text input area within a form
new
autofocus=autofocus
Specifies that the text area field should have focus on page load
cols=
value
Defines the number of columns in the text input area
disabled=disabled
Disables the element
new
new
form=
form_id
Specifies one or more forms the text area belongs to
maxlength=
number
Specifies the maximum number of characters allowed in the text area
name=
text
Assigns a name to the text area
new
placeholder=
text
Specifies a hint to help users fill out the input field
readonly=readonly
Prevents the user from editing content in the text area
new
required=required
Indicates that the input field's value is required in order to submit
the form
rows=
value
Defines the number of rows in the text input area
new
wrap=hard, soft
Specifies how the text in the text area is wrapped, and if it should be
wrapped when submitted in a form
<tfoot>….</tfoot>
Identifies and groups rows into a table footer
align=
position
**
Specifies horizontal alignment
char=
character
**
Specifies a character on which to align column values (for example,
a period is used to align monetary values)
charoff=
value
**
Specifies a number of characters to offset data aligned with the character
specified in the char property
valign=
position
**
Sets vertical alignment of cells in a group
<th>….</th>
Defines a table header cell; contents are bold and center-aligned by
default
colspan=
value
Defines the number of adjacent columns spanned by the cell
new
headers=
header_id
Specifies one or more header cells a cell is related to
rowspan=
value
Defines the number of adjacent rows spanned by the cell
scope=col, colgroup, row,
rowgroup
Specifies whther a header cell is a header for a column, row, or group
of columns or rows
new
width=
pixels, %
**
Sets the width of the table in either pixels or a percentage of the whole
table width
new
New with HTML5
* Deprecated tags
** Not supported in HTML5