CSS Property Value How to - caption-side: bottom;








Question

We would like to know how to caption-side: bottom;.

Answer


<!DOCTYPE html>
<html lang="en">
<head>
<title>Example of CSS caption-side property</title>
<style type="text/css">
caption {<!--from  w  ww.j a v  a 2 s .  c o  m-->
  caption-side: bottom;
}
</style>
</head>
<body>
  <table border="1">
    <caption>Table 1.1 Students</caption>
    <tr>
      <th>Name</th>
      <th>Age</th>
    </tr>
    <tr>
      <td>Alax</td>
      <td>alax@example.com</td>
    </tr>
    <tr>
      <td>Joy</td>
      <td>joy@example.com</td>
    </tr>
  </table>
  <p>
    <strong>Note:</strong> Internet Explorer 8 supports the caption-side
    property only if a
    <code>&lt;!DOCTYPE&gt;</code>
    is specified.
  </p>
</body>
</html>

The code above is rendered as follows: