# text-align-last property

The `text-align-last` property sets an alignment of last line of text: left, right, center, left and right simultaneously.

Please note that if there is only one line in an element (for example, a paragraph), then it is considered both the first and the last and its alignment will be as specified in `text-align-last`, not in `text-align`.

## Syntax

`selector { text-align-last: center | left | right | justify | auto | start | end; }`

## Values

Value | Description
--- | ---
`center` | Center.
`left` | To the left.
`right` | To the right.
`justify` | Simultaneously both right and left.
`auto` | Does not change element alignment.
`start` | Equal to `left` if the text goes from left to right and `right` when the text goes from right to left (Arabic, etc.).
`end` | Equal to `right` if the text goes from left to right and `left` when the text goes from right to left.
`inherit` | Inherits a parent value.

Default value: `auto`.

## Example . The left value

`<p> Lorem ipsum dolor sit amet, consectetur adipiscing elitorire aenean a dapibus magna, ac interdum nisl. Suspendisse egetil fringilla nibh, eu commodo arcu. Donec lacinia tempor velite sed tincidunt. Aliquam porttitor nulla purus, vel vulputater ipsum faucibus sed. Phasellus sodales, lorem vel cursus vehi ante purus lacini dui, interdum fringilla massa eros ut duir. </p> <p> Lorem ipsum dolor sit amet. </p>` `p { text-align: justify; text-align-last: left; }`

:

## Example . The right value

`<p> Lorem ipsum dolor sit amet, consectetur adipiscing elitorire aenean a dapibus magna, ac interdum nisl. Suspendisse egetil fringilla nibh, eu commodo arcu. Donec lacinia tempor velite sed tincidunt. Aliquam porttitor nulla purus, vel vulputater ipsum faucibus sed. Phasellus sodales, lorem vel cursus vehi ante purus lacini dui, interdum fringilla massa eros ut duir. </p> <p> Lorem ipsum dolor sit amet. </p>` `p { text-align: justify; text-align-last: right; }`

:

## Example . The center value

`<p> Lorem ipsum dolor sit amet, consectetur adipiscing elitorire aenean a dapibus magna, ac interdum nisl. Suspendisse egetil fringilla nibh, eu commodo arcu. Donec lacinia tempor velite sed tincidunt. Aliquam porttitor nulla purus, vel vulputater ipsum faucibus sed. Phasellus sodales, lorem vel cursus vehi ante purus lacini dui, interdum fringilla massa eros ut duir. </p> <p> Lorem ipsum dolor sit amet. </p>` `p { text-align: justify; text-align-last: center; }`

:

## Example . The justify value

`<p> Lorem ipsum dolor sit amet, consectetur adipiscing elitorire aenean a dapibus magna, ac interdum nisl. Suspendisse egetil fringilla nibh, eu commodo arcu. Donec lacinia tempor velite sed tincidunt. Aliquam porttitor nulla purus, vel vulputater ipsum faucibus sed. Phasellus sodales, lorem vel cursus vehi ante purus lacini dui, interdum fringilla massa eros ut duir. </p> <p> Lorem ipsum dolor sit amet. </p>` `p { text-align: justify; text-align-last: justify; }`

:

← →
↑
en ru