Html-td-tag

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

HTML-<td>タグ

説明

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

<!DOCTYPE html>
<html>

   <head>
      <title>HTML td Tag</title>
   </head>

   <body>
      <table border = "1">
         <tr>
            <th>Subject</th>
            <th>Topic</th>
         </tr>

         <tr>
            <td>Java</td>
            <td>Threading</td>
         </tr>

         <tr>
            <td>C&plus;&plus;</td>
            <td>Virtual Functions</td>
         </tr>

         <tr>
            <td>Linux</td>
            <td>File Systems</td>
         </tr>
      </table>
   </body>

</html>

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

グローバル属性

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

特定の属性

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

Attribute Value Description
abbr abbreviated_text Deprecated− Specifies an abbreviated version of the content in a cell.
align right left center justify char Deprecated − Visual alignment.
axis name Deprecated− Specifies a category for this td. This can potentially be used to perform queries against the table data and can be beneficial in the context of a speech browser.
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"
colspan number Specifies the number of columns the current cell spans across.
header id Specifies a space-separated list of header cells that contain information about this cell. The value needs to correspond with the id of the header cell (which is set using the id attribute). This attribute is useful for non-visual browsers.
height pixels Deprecated − Specifies the height of the table cell.
nowrap nowrap Deprecated − Prevents text from automatically wrapping.
rowspan numbers Specifies the number of rows the current cell spans across.
scope col colgroup row rowgroup Deprecated − This attribute is used on header cells and specifies the cells that will use this header’s information.
valign top middle bottom baseline Deprecated − Vertical alignment.
width pixels or % Deprecated − Specifies the width of the table cell

イベント属性

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

ブラウザのサポート

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