abbr.Thailand 泰國(guó)
html th標(biāo)簽 語(yǔ)法
作用:定義表格內(nèi)的表頭單元格。
說(shuō)明:HTML 表單中有兩種類(lèi)型的單元格:表頭單元格 - 包含表頭信息(由 th 元素創(chuàng)建)標(biāo)準(zhǔn)單元格 - 包含數(shù)據(jù)(由 td 元素創(chuàng)建)。th 元素內(nèi)部的文本通常會(huì)呈現(xiàn)為居中的粗體文本,而 td 元素內(nèi)的文本通常是左對(duì)齊的普通文本。
注釋:如果需要將內(nèi)容橫跨多個(gè)行或列,請(qǐng)使用 colspan 和 rowspan 屬性。
html th標(biāo)簽 示例
<html> <body> <table border="1"> <tr> <th>Company</th> <th>Address</th> </tr> <tr> <td>Apple, Inc.</td> <td>1 Infinite Loop Cupertino, CA 95014</td> </tr> </table> </body> </html>
運(yùn)行實(shí)例 ?
點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例
<html> <body> <table border="1"> <tr> <th>name</th> <th>description</th> </tr> <tr> <td>西門(mén)大官人</td> <td>PHP中文網(wǎng)高級(jí)講師,PHP高級(jí)工程師</td> </tr> </table> </body> </html>
運(yùn)行實(shí)例 ?
點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例