The best HTML <td> tag Tutorial In 2024, In this tutorial you can learn Examples,Browser Support,Tag definitions and instructions,Tips and Notes,Differences between HTML 4.01 and HTML5,Attributes,Global Properties,Event Properties,Try - Example,related articles,
A simple HTML form with two cells:
All major browsers support <td> tag.
<Td> tag defines a standard HTML table cells.
HTML table, there are two types of cells:
<Th> element is typically rendered as bold text and centered.
<Td> element is usually plain text left-aligned text.
Tip: If youneed content across multiple rows or columns, use colspan and rowspan attributes!
HTML 5 is no longer some HTML 4.01 attributes support.
属性 | 值 | 描述 |
---|---|---|
abbr | text | HTML5 不支持。规定单元格中内容的缩写版本。 |
align | left right center justify char |
HTML5 不支持。规定单元格内容的水平对齐方式。 |
axis | category_name | HTML5 不支持。对单元格进行分类。 |
bgcolor | rgb(x,x,x) #xxxxxx colorname |
HTML5 不支持。HTML 4.01 已废弃。 规定单元格的背景颜色。 |
char | character | HTML5 不支持。规定根据哪个字符来进行内容的对齐。 |
charoff | number | HTML5 不支持。规定对齐字符的偏移量。 |
colspan | number | 规定单元格可横跨的列数。 |
headers | header_id | 规定与单元格相关联的一个或多个表头单元格。 |
height | pixels % |
HTML5 不支持。HTML 4.01 已废弃。 设置单元格的高度。 |
nowrap | nowrap |
HTML5 不支持。HTML 4.01 已废弃。 规定单元格中的内容是否折行。 |
rowspan | number | 设置单元格可横跨的行数。 |
scope | col colgroup row rowgroup |
HTML5 不支持。定义将表头单元格与数据单元格相关联的方法。 |
valign | top middle bottom baseline |
HTML5 不支持。规定单元格内容的垂直排列方式。 |
width | pixels % |
HTML5 不支持。HTML 4.01 已废弃。 规定单元格的宽度。 |
<td> tag supports HTML global properties .
<td> tag supports HTML event properties .
Table title
This example demonstrates how to display table headers.
Empty Cells
This example demonstrates how to use the "& nbsp;" no content processing cell.
Table with headings
This example demonstrates with a title (caption) form.
Tags within the table
This example demonstrates how to display elements inside other elements.
Interbank across columns or table cell
This example demonstrates how to define cross or across columns of a table cell.
HTML Tutorial: HTML table
HTML DOM Reference: Td objects