In HTML, you can set the color of the table line by adding the border attribute to the table and td elements. The specific syntax format is "table,td {border: border line width style color value;}".
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
After adding a border to the table tag using the border attribute, the default border line color is black:
商品 | 价格 |
T恤 | ¥100 |
牛仔褂 | ¥250 |
牛仔库 | ¥150 |
We can add borders to the table through css.
Only set the border style for table and td tags.
table,td { border:1px solid pink; }
Rendering:
Recommended tutorials: "html video tutorial", "css video tutorial》
The above is the detailed content of How to set the color of table lines in html. For more information, please follow other related articles on the PHP Chinese website!