Text-align

The   property is used in CSS and certain HTML elements. It describes how inline content (eg. text) is aligned in its parent block element. This property does not control the alignment of block elements itself, only their inline content.

Values

 * - The inline contents are aligned to the left edge of the line box.
 * - The inline contents are aligned to the right edge of the line box.
 * - The inline contents are centered within the line box.
 * - The text is justified. Text should line up their left and right edges to the left and right content edges of the paragraph.
 * - The same as  if direction is left-to-right and   if direction is right-to-left.
 * - The same as  if direction is left-to-right and   if direction is right-to-left. (Requires Gecko)


 * Mozilla Extensions
 * - Centers inline and also block content.
 * - Aligns inline and also block content.
 * - Aligns inline and also block content.

To apply this in HTML, use:

Text on the right

That will produce:

Text on the right

To apply this in CSS, in the  element for example, use:

h1 { text-align:center; }