HTML <td> Tag

HTML <td> Tag

In this tutorial, we will learn about td tag in HTML with the help of examples.

<td> Tag

Td tag <td> is used to specify a cell or table data within a table.




<!DOCTYPE html>
    <title>td tag</title>
        <th>First Name</th>
        <th>Last Name</th>


Image Not Loaded

Specific Attribute

Attribute Value Description
abbr abbreviated_text It specifies an abbreviated version of the content in a cell
align right
It is used for visual alignment
bgcolor rgb(x,x,x)
It specifies the background color of the table
cellpadding pixels
It specifies the space between the cell borders and their contents
char character It specifies which character to align text on align = char
charoff pixels
It specifies an alignment offset(either in pixels or percentage value) against the first character as specified with the char attribute. It is used when align = char
colspan number It specifies the number of columns the current cell spans accross
header height It specifies a space-seperated 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
nowrap nowrap It is used to prevents text from automatically wrapping
rowspan numbers It is used to specify the number of rows the current cell spans across
valign top
It is used for vertical alignment
width pixels
It is used to specify the width of the table

Global Attribute

Td Tag support all the global attributes of HTML.

Event Attribute

Td Tag support all the event attributes of HTML.

Next Tutorial

We hope that this tutorial helped you develop better understanding of the concept of <td> tag in HTML.

Keep Learning : )

In the next tutorial, you'll learn about HTML <template> Tag.

- Related Topics