td {
border: 1px solid black
}

table {
border-collapse: collapse
}

This will involve border collapsing, which will push the cells together which will leave only the wider of the two adjacent borders visible.

How to add a border to every cell in a table