HTML <thead> alignProperty

HTML <thead> Tag

Example

Left-align the content in the <thead> element:

<table border="1" width="100%">
  <thead align="left">
    <tr>
      <th>Month</th>
      <th>Savings</th>
    </tr>
  </thead>
    <tr>
      <td>January</td>
      <td>$100</td>
    </tr>
    <tr>
      <td>February</td>
      <td>$80</td>
    </tr>
</table>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the align attribute.

Note:IE cannot correctly handle the "justify" value; IE treats it as centered.

Note:Almost no browser can correctly handle the "char" value.


Definition and Usage

HTML5 does not support the <thead> align attribute. Please use CSS instead.

The align attribute specifies the horizontal alignment of the content in the <thead> element.


Syntax

<thead align="left|right|center|justify|char">

Property value

Value Description
left Left-aligned content.
right Right-aligned content.
center Center-aligns the content (the default value for the header element).
justify Stretch the lines so that each line can have equal width (as in newspapers and magazines).
char Align the content to the specified character.


HTML <thead> Tagother extensions