Generally, when we use a table, we always give it a border attribute, such as: <table border=1>, and the effect is as follows:
| ID | NAME | GENDER |
| 1001 | mike | male |
You can find that the border of the table seems to be very wide. Of course, the width here is definitely not the width of the table border. The width you see should be due to the gap between <td>. Therefore, you only need to modify the cellpacing attribute of the table, that is: <table border=1px cellpacing=0px>, the effect is as follows:
| ID | NAME | GENDER |
| 1001 | mike | male |
However, it seems that the width is not as we imagined: it is only one pixel wide. In fact, what you see above is actually the width of two pixels. Why? This is because the borders between <td> do not overlap. Just modify the border-collapse property of the table.
That is <table border=1px cellpacing=0px style=border-collapse:collapse>
| ID | NAME | GENDER |
| 1001 | mike | male |
Add a color to the table, <table border=1px bordercolor=#000000cellspacing=0px style=border-collapse:collapse>
| ID | NAME | GENDER |
| 1001 | mike | male |