'center' centers content between the margins of a page, table, or other object : center « Tags « HTML / CSS






'center' centers content between the margins of a page, table, or other object

    
<html>
<head>
<title>center element example</title>
</head>
<body>
   <center>
      <table width="400" border="8" cellspacing="5" cellpadding="5" align="center">
      <caption valign="bottom" style="color:blue">
         This table is centered within the margins of the page.
      </caption>
      <tr>
         <td>not centered</td>
         <td><center>centered</center></td>
      </tr>
      <tr>
          <td><center>centered</center></td>
          <td>not centered</td>
      </tr>
      </table>
  </center>
  <center>Centered</center>
  <br>
  not centered
</body>
</html>
           
      
      








Related examples in the same category