Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
  border: 1px solid black;
}
/* Default CSS Values */
caption {
  display: table-caption;
  text-align: center;
}
</style>
</head>
<body>
<p>A caption element is displayed like this:</p>
<table>
  <caption>Monthly savings</caption>
    <tr>
      <th>Month</th>
      <th>Savings</th>
    </tr>
    <tr>
      <td>January</td>
      <td>$100</td>
    </tr>
    <tr>
      <td>February</td>
      <td>$50</td>
    </tr>
</table>
<p>A customized caption element (changed text-align):</p>
<table>
  <caption style="text-align:left;">Monthly savings</caption>
    <tr>
      <th>Month</th>
      <th>Savings</th>
    </tr>
    <tr>
      <td>January</td>
      <td>$100</td>
    </tr>