Center samples

These are html tags you type.


Within the style container in the head,
or within a separate style sheet file:
      table
        {
        width:        60%;
        border:       5px green double;
        margin-left:  auto;
        margin-right: auto;
        }

In the body:
           <table>  
             <tr>  
               <th>   Heading 1   </th>  
               <th>   Heading 2   </th>  
             </tr>  
             <tr>  
               <td>   Datum 1   </td>  
               <td>   Datum 2   </td>  
             </tr>  
           </table>  

NOTE:
  • The  auto  margin widths automatically balance the table to the center.
  • The width must be specified for this  auto  technique to work.
  • The  th  elements balance to the center without center being specified.

This is the resulting web page content:


Heading 1 Heading 2
Datum 1 Datum 2