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

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML table rules Eigenschaft

Die rules-Eigenschaft legt fest, welche Teile der internen Rahmen angezeigt werden sollen. Aus praktischen Gründen ist es am besten, keine Regeln zu spezifizieren, sondern CSS zu verwenden.

 HTML <table> Tag

Online-Beispiel

Nur die Rahmen zwischen den Zeilen anzeigen:

<p>Die Tabelle hat rules="rows":</p>
<table rules="rows">
  <tr>
    <th>Klasse</th>
    <th>Menschen</th>
  </tr>
  <tr>
    <td>3. Klasse</td>
    <td>56</td>
  </tr>
</table>
<p>Die Tabelle hat rules="cols":</p>
<table rules="cols">
  <tr>
    <th>Klasse</th>
    <th>Menschen</th>
  </tr>
  <tr>
    <td>3. Klasse</td>
    <td>56</td>
  </tr>
</table>
<p>Die Tabelle hat rules="all":</p>
<table rules="all">
  <tr>
    <th>Klasse</th>
    <th>Menschen</th>
  </tr>
  <tr>
    <td>3. Klasse</td>
    <td>56</td>
  </tr>
</table>
Testen Sie, ob ‹/›

Browser-Kompatibilität

IEFirefoxOperaChromeSafari

Internet Explorer 9+, Firefox, Opera, Chrome and Safari support the rules attribute.

Note:Internet Explorer 8 and earlier versions do not support the rules attribute of the <table> tag.

Note:Chrome and Safari display the property incorrectly: in addition to the inner border, the affected outer border is also added.

Definition and Usage

HTML5 The <table> rules attribute is not supported. Please use CSS instead.

The rules attribute specifies which part of the inner border is visible.

For practical purposes, it is better not to specify rules, but to use CSS to add them borders (border style).

Syntax

<table rules="value">

Attribute Value

ValueDescription
noneNo lines.
groupsLines between row and column groups.
rowsLines between rows.
colsLines between columns.
allLines between rows and columns.
 HTML <table> Tag