CSS text-align-last Property


In CSS, the text-align-last property is used to align the last line of a paragraph just before the line break. The line break could be caused by the natural end of a paragraph or by the use of the <br> tag.

The text-align-last property aligns all of the last lines in the element to which the text-align-last property is applied.

For example, if the text-align-last property is applied to the <p> element, the text-align-last property will affect all of the <p> element's last lines.

Syntax

Example

Preview

Property Values

Value Description
auto The default value. The final line is justified and aligned to the left.
left The final line is oriented to the left.
right The final line is oriented to the right.
center The final line is centered.
justify The last line is justified in the same way that the rest of the lines are.
start The final line is aligned at the start of the line (left if the text-direction is left-to-right, and right is the text-direction is right-to-left)
end The final line is aligned at the line's end (right if the text-direction is left-to-right, and left is the text-direction is right-to-left)
initial This property is set to its default value.
inherit This property is inherited from its parent element.

Supported Browsers

Property Chrome Firefox Safari Edge / IE Opera
text-align-last 47.0 49.0 
12.0 -moz-
Not supported 5.5 34.0