" can add a dark red border to the table."/> " can add a dark red border to the table.">
Home > Article > Web Front-end > How to set the border color of html table
Table is a layout method commonly used in web page production before, but with the rise of DIV CSS, table has lost its glory. But it is also used from time to time when we create web pages. A table can also set its border color arbitrarily using a DIV.
#htmlHow to set the border color of the table
You only need to add the bordercolor attribute to the table to set the border color for the table.
Recommended learning: html tutorial
<table border="5"align="center"height="100"width="400"bordercolor="#CC0000"> <tr> <td>1</td> <td>2</td> </tr> <tr> <td>1</td> <td>2</td> </tr> </table>
Effect:
PHP中文网!
The above is the detailed content of How to set the border color of html table. For more information, please follow other related articles on the PHP Chinese website!