text-align-last
The text-align-last CSS property sets the alignment of the last line of text before a forced line break.
Overview
The text-align-last CSS property sets the alignment of the last line of text before a forced line break.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 47 | 12 | 49 | 16 | 47 | 16 | |
auto | 47 | 12 | 12 | 16 | 47 | 16 |
1+Supported (version) Not supported ※Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)
Notes 2 item(s)
Removed
- This feature was removed in a later browser version (53)
Compatibility
- Available with a vendor prefix: -moz- (12)
Syntax
CSS
.justified {
text-align: justify;
text-align-last: center;
}
.right-last {
text-align: justify;
text-align-last: right;
} Live demo
Use cases
Using text-align-last
The text-align-last CSS property sets the alignment of the last line of text before a forced line break.
Cautions
- May not be supported in older browsers.
Accessibility
- Make sure visual changes are conveyed appropriately to assistive technology.
Related links
Powered by web-features