If you want a specific margin e.g. 20px, you can put the table inside a div.
test heading
test data
So the #tableDiv has a margin of 20px but the table itself has a width of 100%, forcing the table to be the full width except for the margin on either sides.
#tableDiv {
margin: 20px;
}
table {
width: 100%;
}