| text-align |
| Whereas Font Properties control the display options of the type of your document, Text Properties control the options pertaining to the layout and appearance of the paragraphs in which the text is presented.
Some text properties include text capitalization and minor effects such as blinking and underlined sections of text. text-align This property sets the alignment, or justification, of the text within whichever element it is invoked. The values are left justified, right justified, centered, and equally justified (sometimes called left-right justification, or simply justified). The alignment may be set on any block level element, the default being set by the browser properties. Text alignment values are inherited. text-align values left alignment This value aligns text along the leftmost side of the element in which it was invoked. It will normally follow the leftmost side, even along indentations. The default for the english language is left justified, since text is read left to right. syntax {text-align: left} right alignment This value aligns text along the rightmost side of the element in which it was invoked. It will normally follow the rightmost side, even along indentations. syntax {text-align: right} center alignment This value will place the text in the center of the element in which it was invoked, regardless of its size and the amount of text being centered. The text will be spaced uniformly from the left and right margins. syntax {text-align: center} justified This property places text in a column, like a newspaper. The text is aligned precisely along both the right and left margins. Text is spaced on the line according to the length of the word and the space available. syntax {text-align: justify} EXAMPLES: H3, H4 {text-align: center} This example sets the text heading levels H3 and H4 to be centered in the document. OL {text-align: right} This example causes the ordered list and its contents (list elements) to be aligned flush with the right margin. |