You are here: Reference > HTML > tags > td

td element

Browser support:
Specifies a data cell in a table.
The td element must be placed within a table element. If you want to allow the rendering of cells without any content, use the empty-cells style property with value 'show'. For more information, please see the page for the table element.
If you want to see the HTML tags by categories, please visit this page.
This element requires a closing tag.
JavaScript page for this element: td.

Possible members:

Attributes
Events
Styles
Pseudos
abbr
Sets an abbreviation for a table header or table cell data.
accessKey
Sets an access key to an element.
align
Sets the horizontal alignment of the contents in an object.
axis
Sets a comma-separated list of category names.
background
Sets the background picture, which will be tiled if it is smaller than the object's dimensions.
bgColor
Sets the background color.
borderColor
Sets the color of the border.
borderColorDark
Sets or retrieves the color used to draw the right and bottom borders of a table.
borderColorLight
Sets or retrieves the color used to draw the left and top borders of a table.
ch
Sets an alignment character. The alignment of the contents of the cells in the same column depends on this character. The first occurrence of the alignment character in each cell in a column will be on a vertical axis.
char
Sets an alignment character. The alignment of the contents of the cells in the same column depends on this character. The first occurrence of the alignment character in each cell in a column will be on a vertical axis.
charOff
Sets the horizontal offset of the ch and char attributes. The direction of the offset is the same as the direction of the text (dir attribute).
chOff
Sets the horizontal offset of the ch and char attributes. The direction of the offset is the same as the direction of the text (dir attribute).
class
Sets the style class or classes that belong to the element.
colSpan
Sets how many columns wide a cell should be.
contentEditable
3
Sets whether the contents of the object are editable.
dir
Sets the text direction as related to the lang attribute.
DISABLED
Sets the state of an object for user interaction.
draggable
3.55
Sets whether an element is draggable.
headers
Sets a list of header cells that provide header information for the current data cell.
height
Specifies the height of an element.
HIDEFOCUS
Specifies whether a dotted rectangle (focus rectangle) is drawn around an object while it has focus.
id
Sets a unique identifier for the object.
lang
Specifies the language of the element.
language
Sets the scripting language for the current element. Use it only for the script element.
name
Sets the name of an element.
NOWRAP
Specifies whether the text in a table cell can be wrapped.
rowSpan
Specifies how many rows high a table cell should be.
scope
Sets the type of header information that belongs to a table cell.
spellcheck
Sets whether the automatic spellchecker is enabled.
style
Sets an inline style associated with an element.
tabIndex
Specifies the tabbing order for keyboard navigation using the TAB key.
title
Specifies a tooltip for an element.
unSelectable
Sets whether the selection process can start in an element's content.
vAlign
Specifies the vertical alignment of the text within an object.
width
Specifies the default width of the element.
xml:lang
Sets the language code of the XML document.

Example HTML code 1:

This example illustrates the use of the td element:
<table border="1px">
    <caption align="right">fruits</caption>
    <tr>
        <td>Apple</td>
        <td>Pear</td>
        <td>Peach</td>
    </tr>
</table>
Did you find this example helpful? yes no

Related pages:

External links:

User Contributed Comments

Post Content

Post Content