CSS2 Test Suite: 16.2 text-align

[index page] [section] [Previous] [Next] [Specification]

The style declarations contained within this page:

.cl1 {text-align: left;}
.cl2 {text-align: right;}
.cl3 {text-align: center;}
.cl4 {text-align: justify;}
.cl5 {text-align: ".";}div.parent {text-align: left;}
div.inh1 {text-align: right;}
div.inh2 {text-align: center;}


[cl1] This sentence should be left-justified.

[cl2] This sentence should be right-justified.

[cl3] This sentence should be centered.

[cl4] This sentence should be fully justified, which means that the right and left margins of this paragraph should line up, no matter how long the paragraph becomes; the exception, of course, is the last line, which should be left-justified in Western languages.

In the following table, all content should align on the period (.) symbol.

451.27$999.95
578.1$12,499.95
450#9.95
1923875.934572$59.95
3.14159265$1499.95

[div.parent] This DIV has been set with parental styles. The inline elements within this DIV are enclosed in square brackets in order to more easily discern their placement.
[div.inh1] This DIV should have its text left aligned, as it has a style attribute set to inherit the text-align value. [/div.inh1]
[div.inh2] This DIV should have its text left aligned, as it has a style attribute set to inherit the text-align value. [/div.inh2]
This is the end of the parent DIV. [/div.parent]

[index page] [section] [Previous] [Next] [Specification]