You can use more than one selector at a time by making a comma separated list:

th, td {

}

This will style both table headings and table data.  You can even use the different selectors:

th, td, .fred, #first {

}

Open table.html and save it as multiple.html.  In that there are two rule sets which are doing the same job.  View the page in a browser and then delete the th rule set completely.  The border should go on the headings.

Now amend the remaining selector from td:

td {

to both td and th:

td, th {

The border should be back as both types of element are styled by one rule set.