table

Form

<table> ... </table>

Attributes

attribute default descripiton
id none specifies the unique ID
class none specifies the style sheet class
style none specifies the style sheet
bgcolor none specifies the background color for the table
background none specifies the background image for the table
width none specifies the width of the table
height none specifies the height of the table
border none specifies the border width
bordercolor none specifies the color of the border
bordercolorlight none specifies the color of the unshaded edge of the border
bordercolordark none specifies the color of the shaded edge of the border
cellspacing none specifies the space between cells
cellpadding none specifies the space between the cell and the content
frame void specifies which sides of the border surrounding a table will be visible
rules none specifies the borders between table cells
align none specifies the alignment of the entire table
hspace none specifies the horizontal space between the table and the text when the align attribute is set
vspace none specifies the vertical space between the table and the text when align attribute is set

Support

HTML 3.2, HTML 4.01 [STF], XHTML 1.0 [STF], XHTML 1.1, XHTML Basic
Microsoft (MSDN)
[IE3 or later][Firefox 1 or later][Safari 1 or later][Opera 3 or later][Netscape 2 or later]

Explanation

The table tag specifies a table.

Related Tags

tbody, td_, tfoot, th_, thead, tr_

Sample Code [Output]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=shift_jis">
<title>Sample</title>
</head>
<body>
<h1>Sample</h1>
<table>
<tr><th>Brand</th><th>Quantity</th></tr>
<tr><td>TUGARU</td><td>2</td></tr>
<tr><td>FUJI</td><td>10</td></tr>
</table>
</body>
</html>