text-align
Expression Studio 3.0
Sets whether the text in the object is left-aligned, right-aligned, centered, or justified.
The following example uses the text-align property to align text within the object. This example uses the P element as a selector and two classes to call an embedded style sheet that aligns the text according to the respective rule:
<style>
p {text-align:center}
.align1 {text-align:right}
.align2 {text-align:justify}
</style>
</head>
<body>
<p onclick= "this.className='align1'"
ondblclick="this.className='align2'">
. . . </p>
This example uses inline scripting to change the alignment of the text when an onmouseover event occurs:
<p style="font-size:14" onmouseover="this.style.textAlign='center'"> . . . </p>
This property is defined in Cascading Style Sheets (CSS), Level 1 (CSS1).