text-align-last

Controls the alignment of the last line in justified (text-align: justify) text. Also applies to regular text, but primarily used with justify.

Class List

ClassCSSDescription
talntext-align-last: autoBrowser default. Follows the text-align property
talltext-align-last: leftAlign last line to the left
talrtext-align-last: rightAlign last line to the right
talctext-align-last: centerCenter the last line
taljtext-align-last: justifyJustify the last line as well

Visual Comparison

Compares how the last line is aligned in justified text.

auto (default value) — taln

The East Sea and Baekdu Mountain, until they are dry and worn away, God protect our nation forever. Mugunghwa three thousand ri, splendid rivers and mountains.

left — tall

The East Sea and Baekdu Mountain, until they are dry and worn away, God protect our nation forever. Mugunghwa three thousand ri, splendid rivers and mountains.

right — talr

The East Sea and Baekdu Mountain, until they are dry and worn away, God protect our nation forever. Mugunghwa three thousand ri, splendid rivers and mountains.

center — talc

The East Sea and Baekdu Mountain, until they are dry and worn away, God protect our nation forever. Mugunghwa three thousand ri, splendid rivers and mountains.

justify — talj

The East Sea and Baekdu Mountain, until they are dry and worn away, God protect our nation forever. Mugunghwa three thousand ri, splendid rivers and mountains.

Usage Examples

<!-- Justify + center last line -->
<p class="taj talc">
  The last line of long text is centered.
  The effect is visible in multi-line paragraphs.
</p>

<!-- Justify + right-align last line -->
<p class="taj talr">
  The last line is right-aligned.
  Useful for signatures or date displays.
</p>

Tips & Notes

Use with taj

text-align-last is most useful when combined with taj (text-align: justify). Allows separate alignment for the last line.