English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML td scope Attribut

Die scope-Attribut definiert die Art und Weise, wie die Überschriftenzellen und Datenzellen in der Tabelle miteinander verknüpft werden. Das scope-Attribut kennzeichnet die Zelle als Spaltenüberschrift, Zeilenüberschrift oder als Gruppe von Spalten- oder Zeilenüberschriften.

 HTML <td> Tag

Online-Beispiel

Nachfolgender Beispiel zeigt, wie zwei <th>-Elemente als Spaltenüberschriften und zwei <td>-Elemente als Zeilenüberschriften markiert werden:

<table style="width:100%" border="1">
  <tr>
    <th>Nummer</<th>
    <th scope="col">Monat</<th>
    <th scope="col">Savings</<th>
  </tr>
  <tr>
    <td scope="row">1</td>
    <td>January</td>
    <td>3100</td>
  </tr>
  <tr>
    <td scope="row">2</td>
    <td>February</td>
    <td>2180</td>
  </tr>
</table>
Test see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

The scope attribute has no visual effect in ordinary web browsers, but it can be used by screen readers.

Definition and Usage

HTML5 The <td> scope attribute is not supported.

The scope attribute defines the method of associating header cells with data cells in the table.

The scope attribute indicates whether a cell is a column, row, column group, or row group header.

Syntax

<td scope="col|row|colgroup|rowgroup">

Attribute Value

ValueDescription
colSpecifies that the cell is the header of a column.
rowSpecifies that the cell is the header of a row.
colgroupSpecifies that the cell is the header of a column group.
rowgroupSpecifies that the cell is the header of a row group.
 HTML <td> Tag