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

HTML-Referenzhandbuch

HTML-Tag-Liste

HTML-Tabelle border-Eigenschaft

Die border-Eigenschaft legt fest, ob um die Zellen der Tabelle ein Raster angezeigt wird.

 HTML <table> Tag

Online Beispiel

The following HTML table will be displayed, with borders around the table cells:

<table border="1">
  <tr>
    <th>Name</th>
    <th>Credits</th>
  </tr>
  <tr>
    <td>Zhang San</td>
    <td>90</td>
  </tr>
  <tr>
    <td>Li Si</td>
    <td>87</td>
  </tr>
</table>
Test it out ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the border attribute.

Definition and Usage

The border attribute specifies whether a border is displayed around the table cell.

Value "1" indicates that the border should be displayed and the table is not used for layout purposes.

HTML 4.01 and HTML5differences between

In HTML5 In this context, the border attribute is used only to indicate whether the table is used for layout purposes and only allows the attribute values "" or "1".

Syntax

<table border="1">

Attribute Value

ValueDescription
""There is no border around the table cell (the table can be used for layout purposes).
"1"Add a border around the table cell (the table is not used for layout purposes).
 HTML <table> Tag