IT. Expert System.

HTML

table


Tag Description

The <table> tag is used to define an HTML table which presents data in rows and columns. A simple HTML table consists of the table element and one or more tr, th, and td elements.

The <tr> element defines a table row, the <th> element defines a table header, and the <td> element defines a table cell.

This tag has the form:

<table>
</table>

HTML5 and HTML4.01 Differences

Only the "summary" attribute is supported in HTML5.

Attributes

Attribute Value Description
align left
right
center
(deprecated in 4.01) Aligns the content in a table row
HTML4: supported in html4.01
HTML5: not supported in html5
bgcolor rgb(x,x,x)
#xxxxxx
colorname
(deprecated in 4.01) Specifies the background color for a table
HTML4: supported in html4.01
HTML5: not supported in html5
border pixels Specifies the width of the borders around a table
HTML4: supported in html4.01
HTML5: not supported in html5
cellpadding pixels Specifies the space between the cell wall and the cell content

Not supported in HTML5
cellspacing pixels Specifies the space between cells
HTML4: supported in html4.01
HTML5: not supported in html5
frame void
above
below
hsides
lhs
rhs
vsides
box
border
Specifies which parts of the outside borders that should be visible
HTML4: supported in html4.01
HTML5: not supported in html5
rules none
groups
rows
cols
all
Specifies which parts of the inside borders that should be visible
HTML4: supported in html4.01
HTML5: not supported in html5
summary text Specifies a summary of the content of a table
width pixels
%
Specifies the width of a table
HTML4: supported in html4.01
HTML5: not supported in html5

Global Attributes

This tag also supports the HTML Global Attributes.

Event Attributes

This tag also supports the HTML Event Attributes.

Examples

The following example shows the basic use of this tag:

<table border="1">
  <tr>
    <th>H1</th>
    <th>H2</th>
  </tr>
  <tr>
    <td>Item 1</td>
    <td>Item 2</td>
  </tr>
</table>

This produces the following result:

H1 H2
Item 1 Item 2

Browser Support

Chrome Firefox IE Safari Opera

Doctype Declaration Support

The following table lists the doctype declarations this element may appear in:

HTML4.01 / XHTML1.0 XHTML 1.1 HTML 5
Traditional Strict Frameset

Miscellaneous Information

Defined In: HTML 2
Empty Tag: No


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 3637 / . Delta: 0.02319 с