td tag

<td> (Table Data Tag)

Explanation

TD tag mentions a individual cell in a table.
<table border = "Value"> <tr> <td>Text</td> </tr> </table>
Element Specific attributes supported by this tag are:
AttributeValueDescription
colspan number Mentions the total number of columns, the cell should span.
headers header_id Denotes the multiple header cells to which the cell is related to.
rowspan number Defines the total number of rows, the cell should span.

Example Code:

Result :

Internet Explorer Chrome Firefox Opera

  • It should be placed inside the <table> and <tr>.
  • Text enclosed by this element will align left by default.
  • It cannot be placed inside the <thead>.
It is available in the previous versions of HTML.
It supports both Global Attributes and Event Attributes in HTML5.

Limitations:

It is applicable to all major browsers.

Ask Questions

Ask Question