text-align

Back to the index.

Extra test page for a bug that occurs on some Android 4 phones.

text-align aligns the text left, right, or center.

You can also justify text, but until the advent of hyphenation the result was usually quite ugly.

Traditional values

text-align: left

The quick brown fox jumped over the lazy dog. Oh, how that fox jumped, quick and brown, while the dog never reacted because he was so very lazy.

text-align: center

The quick brown fox jumped over the lazy dog. Oh, how that fox jumped, quick and brown, while the dog never reacted because he was so very lazy.

text-align: right

The quick brown fox jumped over the lazy dog. Oh, how that fox jumped, quick and brown, while the dog never reacted because he was so very lazy.

text-align: justify

The quick brown fox jumped over the lazy dog. Oh, how that fox jumped, quick and brown, while the dog never reacted because he was so very lazy.

Start and end

The start and end values use the start and end of the text direction. This matters when text is right-to-left: in that case start means right and end means left.

text-align: start

The quick brown fox jumped over the lazy dog. Oh, how that fox jumped, quick and brown, while the dog never reacted because he was so very lazy.

text-align: end

The quick brown fox jumped over the lazy dog. Oh, how that fox jumped, quick and brown, while the dog never reacted because he was so very lazy.

Right-to-left

Here is an example with right-to-left text. All paragraphs below have direction: rtl. I typed in the normal text backward.

left and right should be unaffected; start and end should be reversed.

text-align: left sah hpargarap sihT.

text-align: right sah hpargarap sihT.

text-align: start sah hpargarap sihT.

text-align: end sah hpargarap sihT.

start end

start end is a complex value: the first line of the text, and every first line after a forced line break such as a <br> has text-align: start; any other line has text-align: end. I’m not sure why you would want that.

text-align: start end

Het onderafdelingshoofd Rijksluchtvaartdienstweerschepenpersoneel verontschuldigde zich voor de commissievergadering over de gereviseerde gelijkheidsbeginselencirculaire.
Dit geschiedde uit hoofde van zijn medeverantwoordelijkheid voor de functieomschrijvingswijzigingsproblematiek.