📜  HTML td标签

📅  最后修改于: 2020-11-04 00:46:49             🧑  作者: Mango

HTML标签

HTML标签用于指定包含表格数据的HTML表格的单元格。的标签必须是的子元素(表格行)标签。每个表格行可以包含多个数据元素。

分组一个元素标签呈现为表格中的一行。的内容元素是常规的,默认情况下在表格中左对齐。

句法

  .......  
Display Inline
Start tag/End tag Start and End tag
Usage Table content




    HTML td tag
    


  

Example of td Tag

Product Quantity Price
Books 5 589
T-shirt 5 3500
Jeans 2 5000

输出:

属性:

特定于标签的属性:

Attribute Value Description
abbr text It defines the abbreviated version of content of the cell. (Not Supported in HTML5)
align left
right
center
justify
char
It specifies the alignment of the content of the cell. (Not Supported in HTML5)
axis category_name It Categorizes Cells. . (Not Supported in HTML5)
bgcolor rgb(x,x,x)
#xxxxxx
Color_name
It sets the background color of the cell. (Not Supported in HTML5)
char character It specifies the alignment of the content of cell to the character. (Not Supported in HTML5)
charoff number It determines the number of characters the content aligned from the character specified by the char attribute. (Not Supported in HTML5)
colspan number It determines the number of columns a cell should span.
headers header_id It determines one or more header cells to which a cell is related.
height %
pixels
It determines the height of a table cell. (Not Supported in HTML5)
nowrap nowrap If it sets then content inside the cell should not wrap. (Not Supported in HTML5)
rowspan number It determines the number of rows a cell should span.
scope col
colgroup
row
rowgroup
It specifies the cells that the header element relates to. (Not Supported in HTML5)
valign top
middle
bottom
baseline
It determines the vertical alignment of the cell content. (Not Supported in HTML5)
width %
pixels
It determines the width of the cell.(Not Supported in HTML5)

全局属性:

标签支持HTML中的Global属性。

事件属性:

标签支持HTML中的事件属性。

支持的浏览器

Element chrome browser Chrome ie browser IE firefox browser Firefox opera browser Opera safari browser Safari
Yes Yes Yes Yes Yes