Тег TABLE
TABLE
<TABLE
ALIGN=CENTER | LEFT | RIGHT
BACKGROUND=string
BGCOLOR=color
BORDER=integer
BORDERCOLOR=color
BORDERCOLORDARK=color
BORDERCOLORLIGHT=color
CELLPADDING=string
CELLSPACING=string
COLS=string
FRAME=ABOVE
| BELOW | BORDER | BOX | INSIDES | LHS | RHS | VOID | VSIDES
HEIGHT=string
CLASS=string
ID=string
LANG=string
LANGUAGE=JAVASCRIPT
| JSCRIPT | VBS | VBSCRIPT
RULES=ALL | COLS | GROUPS | NONE | ROWS
STYLE=string
TITLE=string
WIDTH=string
event = script
>
Used to specify that the contained content is organized into a table with
rows and columns. Use the TR, TD, and TH elements in the container to create the
rows, columns, and cells.
- ALIGN=
- Specifies how the table should be aligned.
- BACKGROUND=
- Specifies a background picture for the table. The picture is tiled behind
the text and graphics in the table, table head, or table cell.
- BGCOLOR=
- Sets the background color behind the element.
- BORDER=
- Specifies the thickness of a border to be drawn around the element.
- BORDERCOLOR=
- Sets border color and must be used with the BORDER= attribute, except for frames.
- BORDERCOLORDARK=
- Sets independent border color control over one of the two colors used to
draw a 3-D border, opposite of BORDERCOLORLIGHT= ,
and must be used with the BORDER= attribute.
- BORDERCOLORLIGHT=
- Sets independent border color control over one of the two colors used to
draw a 3-D border, opposite of BORDERCOLORDARK= , and
must be used with the BORDER= attribute.
- CELLPADDING=
- Specifies the amount of space between the border of the cell and the
contents of the cell.
- CELLSPACING=
- Specifies the amount of space between cells in a table.
- COLS=
- The number of columns in the table.
- FRAME=
- Controls the appearance of the border frame around the table.
- HEIGHT=
- Along with the width attribute, specifies the size at which the element is
drawn. Returns the calculated height of the element in pixels. In HTML, this
attribute may be initially set in pixels or percentages.
- CLASS=
- Specifies the class of the tag being defined. This is most often used to
associated a sub-classed style sheet with the tag.
- ID=
- An SGML identifier used as the target for hypertext links or for naming
particular elements in associated style sheets. Valid names to script with are
any alphanumeric string that begins with a letter. Valid special characters
include underbar "_".
- LANG=
- This specifies the language to use. The specifier is an ISO standard
language abbreviation.
- LANGUAGE=
- Specifies the language that the current script is written in. JavaScript is
the default for this attribute.
- RULES=
- Specifies which dividing lines are displayed (inner borders).
- STYLE=
- Specifies an in-line style sheet for the tag.
- TITLE=
- The Title attribute is used to provide advisory information.
- WIDTH=
- Returns the calculated width of the element in pixels. In HTML, this
attribute may be initially set in pixels or percentages.
- event
- Can be one or more of these events:
onafterupdate onbeforeupdate
onblur onclick
ondblclick ondragstart
onfocus onhelp
onkeydown onkeypress
onkeyup onmousedown
onmousemove onmouseout
onmouseover onmouseup
onresize onrowenter
onrowexit onscroll
onselectstart
Valid tags within a table include:
- TR
- CAPTION
- THEAD
- TBODY
- TFOOT
- COLGROUP
- COL
This element is a block element.
Both the start and end tags are required.
Example
<TABLE BORDER=1 WIDTH=80%>
<THEAD>
<TR>
<TH>Heading 1</TH>
<TH>Heading 2</TH>
</TR>
<TBODY>
<TR>
<TD>Row 1, Column 1 text.</TD>
<TD>Row 1, Column 2 text.</TD>
</TR>
<TR>
<TD>Row 2, Column 1 text.</TD>
<TD>Row 2, Column 2 text.</TD>
</TR>
</TABLE>