align attribute of the h2 tag (XHTML 1.1)
align, text alignmentPlease be aware that this attribute is deprecated within the XHTML 1.1 specification! Look below for more details on an alternative.
The align attribute allows you to specify to which direction text should be aligned. For instance, align="right" would align the text to the right side. However, the align attribute has been deprecated, and instead, you should use the CSS text-align property. For instance, like this:
<h2 style="text-align: right;">Right aligned text</h2>
Possible values
| Value |
|---|
| left |
| center |
| right |
| justify |
align exists in these tags
| Attribute | Deprecated | Description |
|---|---|---|
| applet | Java applet | |
| caption | table caption | |
| col | table column | |
| colgroup | table column group | |
| div | generic language/style container | |
| h1 | heading | |
| h2 | heading | |
| h3 | heading | |
| h4 | heading | |
| h5 | heading | |
| h6 | heading | |
| hr | horizontal rule | |
| iframe | inline subwindow | |
| img | Embedded image | |
| input | form control | |
| legend | fieldset legend | |
| object | generic embedded object | |
| p | paragraph | |
| table | ||
| tbody | table body | |
| td | table data cell | |
| tfoot | table footer | |
| th | table header cell | |
| thead | table header | |
| tr | table row |
© htmlpedia.net 2008 - 2012