English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
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.
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 ‹/›
IEFirefoxOperaChromeSafari
The scope attribute has no visual effect in ordinary web browsers, but it can be used by screen readers.
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.
<td scope="col|row|colgroup|rowgroup">
Value | Description |
---|---|
col | Specifies that the cell is the header of a column. |
row | Specifies that the cell is the header of a row. |
colgroup | Specifies that the cell is the header of a column group. |
rowgroup | Specifies that the cell is the header of a row group. |