" can add a dark red border to the table."/> " can add a dark red border to the table.">

Home >Web Front-end >HTML Tutorial >How to set the border color of html table

How to set the border color of html table

angryTom
angryTomOriginal
2020-03-02 11:54:3734304browse

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.

How to set the border color of html table

#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:

How to set the border color of html table

##For more HTML tutorials, please Follow

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn