ScanSkill

text-align-last

The text-align-last property defines how to align the last line of a text. If an element has multiple paragraphs, the text-align-last applies to last line of every paragraphs.

Syntax

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

Example

        .div-1,
        .div-2,
        .div-3,
        .div-4,
        .div-5,
        .div-6,
        .div-7 {
            border: 1px solid red;
            width: 350px;
        }

        .div-1 {
            text-align-last: auto;
        }

        .div-2 {
            text-align-last: left;
        }

        .div-3 {
            text-align-last: right;
        }

        .div-4 {
            text-align-last: center;
        }

        .div-5 {
            text-align-last: justify;
        }

        .div-6 {
            text-align-last: start;
        }

        .div-7 {
            text-align-last: end;
        }
text-align-last

Property Values

auto: The last line of text is justified and aligned left. (Default value)

left: aligns the last line to the left.

right: aligns the last line to the right.

center: aligns the last line to the center.

justify: justifies the last line as the rest of the lines.

start: align the last line at the beginning of the line.

end: align the last line at the end of the line.