To specify table borders in CSS, use the border
property.
The example below specifies a black border for <table>, <th>, and <td> elements:
table, th, td { border: 1px solid black; }
The border-collapse
property sets whether the table borders should be collapsed into a single border:
table { border-collapse: collapse; } table, th, td { border: 1px solid black; }
原文:https://www.cnblogs.com/Nyan-Workflow-FC/p/10519634.html