<html>
<head>
<style>
 th, td { background: #ddd; }
 table { border-collapse: collapse; }
</style>
</head>
<body>
  
 <table border="1">
  <tr><th>x</th><th colspan="2" class="a1 a2">A</th></tr>
  <tr><th>x</th><td class="a1">a1</td><td class="a2">a2</td></tr>
 </table>

</body>
</html>