content logo

Learn HTML:

Html td tag

The HTML <td> tag is used for specifying a cell or table data within a table.


<!DOCTYPE html>
<title>HTML td Tag</title>
<table border="1">
    <td>Virtual Functions</td>
    <td>File Systems</td>

This will produce following result:

Subject Topic
Java Threading
C++ Virtual Functions
Linux File Systems


Specific Attributes

The HTML <td> tag also supports following additional attributes:

Attribute Value Description
abbr abbreviated_text Deprecated-Specifies an abbreviated version of the content in a cell.
align right
Deprecated-Visual alignment.
axis name Deprecated-Specifies a category for this td. This can potentially be used to perform queries against the table data and can be beneficial in the context of a speech browser.
bgcolor rgb(x,x,x)
Deprecated-Specifies the background color of the table cell.
char character Deprecated-Specifies which character to align text on. Used when align="char"
charoff pixels or % Deprecated-Specifies an alignment offset (either in pixels or percentage value) against the first character as specified with the char attribute. Used when align="char"
colspan number Specifies the number of columns the current cell spans across.
header id Specifies a space-separated list of header cells that contain information about this cell. The value needs to correspond with the id of the header cell (which is set using the id attribute). This attribute is useful for non-visual browsers.
height pixels Deprecated-Specifies the height of the table cell.
nowrap nowrap Deprecated-Prevents text from automatically wrapping.
rowspan numbers Specifies the number of rows the current cell spans across.
scope col
Deprecated-This attribute is used on header cells and specifies the cells that will use this header's information.
valign top
Deprecated-Vertical alignment.
width pixels or % Deprecated-Specifies the width of the table cell

HTML Td Example


HTML Td Code


HTML Td Tutorial