当前位置: 首页 > 文档资料 > HTML 入门教程 >

<tr>

优质
小牛编辑
159浏览
2023-12-01

描述 (Description)

HTML

标记用于指定表中的表行。

例子 (Example)

<!DOCTYPE html>
<html>
   <head>
      <title>HTML tr Tag</title>
   </head>
   <body>
      <table border = "1">
         <tr>
            <th>Cricketers</th>
            <th>Ranking</th>
         </tr>
         <tr>
            <td>M.S Dhoni</td>
            <td>1</td>
         </tr>
         <tr>
            <td>Yuvraj Singh</td>
            <td>2</td>
         </tr>
         <tr>
            <td>Virat Kohli</td>
            <td>3</td>
         </tr>
      </table>
   </body>
</html>

全局属性 (Global Attributes)

此标记支持 - HTML Attribute Reference描述的所有全局属性

具体属性 (Specific Attributes)

HTML

标记还支持以下附加属性 -
属性描述
alignright left center justify charDeprecated - 视觉对齐。
bgcolorrgb(x,x,x) #hexcode colornameDeprecated - 指定表格单元格的背景颜色。
charcharacterDeprecated - 指定要对齐文本的字符。 在align =“char”时使用。
charoff像素或%Deprecated - 指定使用char属性指定的第一个字符的对齐偏移(以像素或百分比值表示)。 在align =“char”时使用。
valigntop middle bottom baselineDeprecated - 垂直对齐。

事件属性 (Event Attributes)

此标记支持 - HTML Events Reference描述的所有事件属性

浏览器支持 (Browser Support)

ChromeFirefoxIEOperaSafariAndroid
YesYesYesYesYesYes