IT. Expert System.

HTML

td


Tag Description

The td tag is used to define a cell in an HTML table.

By default, the text in a <td> element has normal weight and is left-aligned.

This tag has the form:

<td abbr="text"
  axis="text"
  colspan="number"
  headers="cell ID …"
  rowspan="number">
</td>

HTML5 and HTML4.01 Differences

Some HTML4.01 attributes are not supported in HTML5.

Attributes

Attribute Value Description
abbr text Specifies an abbreviated version of the content in a cell
HTML4: supported in html4.01
HTML5: not supported in html5
align left
right
center
justify
char
Aligns the content in a table row
HTML4: supported in html4.01
HTML5: not supported in html5
axis category_
name
Categorizes cells
HTML4: supported in html4.01
HTML5: not supported in html5
bgcolor rgb(x,x,x)
#xxxxxx
colorname
Specifies a background color for a cell
HTML4: deprecated in html4.01
HTML5: not supported in html5
char character Aligns the content in a cell to a character
HTML4: supported in html4.01
HTML5: not supported in html5
charoff number Sets the number of characters the content will be aligned from the character specified by the char attribute
HTML4: supported in html4.01
HTML5: not supported in html5
colspan number Specifies the number of columns a cell should span
headers header
cells'_id
Specifies the table headers related to a cell
height pixels
%
Sets the height of a cell
HTML4: deprecated in html4.01
HTML5: not supported in html5
nowrap nowrap Specifies that the content inside a cell should not wrap
HTML4: deprecated in html4.01
HTML5: not supported in html5
rowspan number Sets the number of rows a cell should span
scope col
colgroup
row
rowgroup
Defines a way to associate header cells and data cells in a table
HTML4: supported in html4.01
HTML5: not supported in html5
valign top
middle
bottom
baseline
Vertically aligns the content in a cell
HTML4: supported in html4.01
HTML5: not supported in html5
width pixels
%
Specifies the width of a cell
HTML4: deprecated 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>
<td>Body 1.1</td>
<td>Body 1.2</td>
</tr>
<tr>
<td>Body 2.1</td>
<td>Body 2.2</td>
</tr>
</table>

This produces the following result:

Body 1.1 Body 1.2
Body 2.1 Body 2.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: 3000 / . Delta: 0.04531 с