欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

HTML 5 <table> 標(biāo)簽

定義和用法

<table> 標(biāo)簽定義 HTML 表格。

一個簡單的 HTML 表格包括 table 元素,一個或多個 tr、th 以及 td 元素。

tr 元素定義表格行,th 元素定義表頭,td 元素定義表格單元。

更復(fù)雜的 HTML 表格也可能包含 caption, col, colgroup, thead, tfoot, tbody 等元素。

實例

簡單的 HTML 表格,包含兩列兩行:

<table border="1">
  <tr>
    <th>月份</th>
    <th>存款</th>
  </tr>
  <tr>
    <td>一月</td>
    <td>1000 元</td>
  </tr>
</table>

親自試一試

瀏覽器支持

所有主流瀏覽器都支持 <table> 標(biāo)簽。

HTML 4.01 與 HTML 5 之間的差異

在 HTML5 中,僅支持 "border" 屬性,并且只允許使用值 "" 或 "1"。

屬性

屬性 描述
border
  • ""
  • 1
規(guī)定表格單元是否擁有邊框。
cellpadding pixels HTML5 中不支持。
cellspacing pixels HTML5 中不支持。
frame
  • void
  • above
  • below
  • hsides
  • lhs
  • rhs
  • vsides
  • box
  • border
HTML5 中不支持。
rules
  • none
  • groups
  • rows
  • cols
  • all
HTML5 中不支持。
summary text HTML5 中不支持。
width
  • pixels
  • %
HTML5 中不支持。

全局屬性

<table> 標(biāo)簽支持 HTML 5 中的全局屬性

事件屬性

<table> 標(biāo)簽支持 HTML 5 中的事件屬性。