For many beginners of HTML, table
is the most commonly used tag, but for the control of table borders, many beginners do not have their solution.
For many beginners of HTML, table
is the most commonly used tag, but for the control of table borders, many beginners do not have their solution.
Generally we use the table when it will always give it a border attribute, such as:
Id |
NAME |
GENDER |
1001 |
Mike |
Male |
You can find that the table border seems very wide, of course, the "very wide" is definitely not the width of the table border, we see that the width should be between the gap caused. Therefore, only need to modify the table's CellSpacing property, namely:
Id |
NAME |
GENDER |
1001 |
Mike |
Male |
However, as if the width is not as we think: only one pixel wide, in fact, the above figure is actually two pixels wide, why, because the border between is not caused by overlap. To modify the Border-collapse property of the table,
namely
Id |
NAME |
GENDER |
1001 |
Mike |
Male |
Add a color to the table,
Id |
NAME |
GENDER |
1001 |
Mike |
Male |