Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2022.
The text-align-last CSS property sets how the last line of a block or a line, right before a forced line break, is aligned.
The affected line is aligned per the value of text-align, unless text-align is justify, in which case the effect is the same as setting text-align-last to start.
startThe same as left if direction is left-to-right and right if direction is right-to-left.
endThe same as right if direction is left-to-right and left if direction is right-to-left.
leftThe inline contents are aligned to the left edge of the line box.
rightThe inline contents are aligned to the right edge of the line box.
centerThe inline contents are centered within the line box.
justifyThe text is justified. Text should line up their left and right edges to the left and right content edges of the paragraph.
| auto |
| block containers |
| yes |
| as specified |
| discrete |
| CSS Text Module Level 3 # text-align-last-property |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Apr 20, 2026 by MDN contributors.
Your blueprint for a better internet.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.