Html-tr-tag

提供:Dev Guides
移動先:案内検索

HTML-<tr>タグ

説明

HTML <tr>タグは、テーブル内のテーブル行を指定するために使用されます。

<!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>

これは、次の結果を生成します-

グローバル属性

このタグは、− link:/html/html_attributes_reference [HTML属性リファレンス]で説明されているすべてのグローバル属性をサポートします

特定の属性

HTML <tr>タグは、次の追加属性もサポートしています-

Attribute Value Description
align right left center justify char Deprecated − Visual alignment.
bgcolor rgb(x,x,x) #hexcode colorname Deprecated − Specifies the background color of the table cell.
char character Deprecated − Specifies which character to align text on. Used when align = "char".
charoff pixels or % Deprecated − Specifies an alignment offset (either in pixels or percentage value) against the first character as specified with the char attribute. Used when align = "char".
valign top middle bottom baseline Deprecated − Vertical alignment.

イベント属性

このタグは、− link:/html/html_events_reference [HTMLイベントリファレンス]で説明されているすべてのイベント属性をサポートします。

ブラウザのサポート

Chrome Firefox IE Opera Safari Android
Yes Yes Yes Yes Yes Yes