Style textAlignLast Property
Example
Align the last line of a paragraph to the right:
document.getElementById("myDIV").style.textAlignLast="right";
Try it »
Definition and Usage
The textAlignLast property specifies how to align the last line of text.
**Note:** The textAlignLast property only takes effect when the text-align property is set to "justify".
Browser support

Only Internet Explorer supports the textAlignLast property.
Firefox supports an alternative property, the MozTextAlignLast property.
Internet Explorer does not support the "start" and "end" values.
Syntax
Return the textAlignLast property:
object
.style.textAlignLast
Set the textAlignLast property:
object
.style.textAlignLast="auto|left|right|center|justify|start|end|initial|inherit"
Attribute values
| Value | Description |
|---|---|
| auto | Default. The last line is adjusted and aligned to the left. |
| left | The last line is aligned to the left. |
| right | The last line is aligned to the right. |
| center | The last line is centered. |
| justify | The last line is adjusted to be justified. |
| start | The last line is aligned at the start of the line (aligned left if text-direction is left-to-right; aligned right if text-direction is right-to-left). |
| end | The last line is aligned at the end of the line (aligned right if text-direction is left-to-right; aligned left if text-direction is right-to-left). |
| initial | Sets this property to its default value. See initial. |
| inherit | Inherits this property from its parent element. See inherit. |
Technical Details
| Default value: | auto |
|---|---|
| Return Value: | A string representing the element's text-align-last property. |
| CSS version | CSS3 |
Related Articles
CSS Reference Manual:text-align-last property
The Style object