Aligning Text

Contact Us or call 1-877-932-8228
Aligning Text

Aligning Text

The <center> Tag

The <center> tag is used to center lines of text, paragraphs, tables, images, forms, etc.

<p>This text is centered.</p>
<p>So is this text.</p>
<p>This text is not.</p>

The align Attribute

The align attribute is used to align the content of an element. It can be applied to many tags, including heading tags (e.g, <h1>) and <p>, <div>, <table>, <tr>, <td>, <th>, and <hr> tags. It has been deprecated for all uses except with the child elements of the <table> tag.

Possible values for the align attribute are left, right, center, and justify.

<p align="right">This text is aligned right.</p>

See HTMLFormatting/Demos/Alignment.html for more examples of alignment.