td Tag for Table Cells

td Tag for Table Cells

Every cell in a table is given by a <td> tag for cells having data or a <th> tag for cells containing table headings. The content of a <td> element, are usually displayed left – aligned. The <td> tag’s set of attributes applies to that one cell carrying it. Other than the universal and the basic event attributes, the <td> have the following attributes

Abbr – It specifies an abbreviated version of the content in a cell and uses a text value.

colspan – It specifies the number of columns a cell should span and uses a numeric value.

Headers – It specifies table headers related to a cell and uses the header cell’s ID as value

height – It sets the height of a cell but CSS is used now. It takes value in pixels

nowrap – It specifies that the content inside a cell should not wrap and takes the value ‘nowrap’ but CSS is used now.

rowspan – It sets the number of rows a cell should span and uses a numeric value.

scope – It defines a way to associate header cells and data cells in a table

and takes a col, column group, row or row group as value

width – It specifies the width of a cell but CSS is used now. It takes value in pixels

It also has align, bgcolor, char, charoff and valign attributes which have same value and use as explained earlier in <tr> and <table> tag.

tr Tag for Rows
th Tag for Table Heading

Get industry recognized certification – Contact us

keyboard_arrow_up
Open chat
Need help?
Hello 👋
Can we help you?