Reference: http://www.w3school.com.cn/css/css_table.asp
Instance:
<HTML><Head><styletype= "Text/css">/*table {border-collapse:collapse;}*/table, TD, Th{Border:1px solid Green; }th{Background-color:Green;Color: White; }</style></Head><Body><Table><TR><th>Firstname</th><th>Lastname</th></TR><TR><TD>Bill</TD><TD>Gates</TD></TR><TR><TD>Steven</TD><TD>Jobs</TD></TR></Table></Body></HTML>
View Code
Effect:
If you fold the table border into a single border, add the comment lines, and the effect is as follows:
CSS Table Properties
Properties |
Description |
Border-collapse |
Sets whether to merge the table borders into a single border. |
Border-spacing |
Sets the distance separating the border of the cell. |
Caption-side |
Sets the position of the table caption. |
Empty-cells |
Sets whether to display empty cells in the table. |
Table-layout |
Sets the algorithm for displaying cells, rows, and columns. |
CSS notes (eight) table