CSS text-align-last Property

Description

The text-align-last property describes how the last line of a block or a line right before a forced line break is aligned when 'text-align' is set to 'justify'.

Initial value
auto
Applies to
Block containers
Inherited
Yes
Media
Visual
Computed value
Specified value
Animatable
No
CSS Version
CSS3
JavaScript syntax
object.style.textAlignLast

Syntax

text-align-last: auto | start | end | left | right | center | justify

Values

  • autoText is aligned like the other lines in the object, using the value of the text-align property.
  • 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.
  • leftText is aligned to the left.
  • rightText is aligned to the right.
  • centerThe text is 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.

Example

.class {
   text-align-last: right; 
}

Browser Support

Desktop
Explorer Edge Chrome Firefox Opera Safari
5.5124749YesX
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung
474749YesX5.0