In Action

Aligning HTML Table

Align an HTML Table in context to Web Page

Table1 - Align Left
row #1
row #2
Table2 - Align Center
row #1
row #2


Toycode

HTML Code

Just cut-n-paste to reuse.

     
<table border="1">
  <th>Table1 - Align Left</th>
  <tr>
    <td>row #1 </td>
  </tr>
  <tr>
    <td>row #2 </td>
  </tr>
</table>

<table align="center" border="1">
  <th>Table2 - Align Center</th>
  <tr>
    <td>row #1 </td>
  </tr>
  <tr>
    <td>row #2 </td>
  </tr>
</table>