English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Die border-Eigenschaft legt fest, ob um die Zellen der Tabelle ein Raster angezeigt wird.
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 ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the border attribute.
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.
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".
<table border="1">
Value | Description |
---|---|
"" | 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). |