Web4College

CSS text-align-last property

src

Description

CSS text-align-last property aligns the last line of a block container along the inline axis.

Syntax

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

Property values

startDefault

It aligns the content at the start of inline axis.

text-align-last: start;
Try it

end

It aligns the last line of the block container at the end of inline axis.

text-align-last: end;
Try it

left

It aligns the last line at the left side of line box.

text-align-last: left;
Try it

right

It aligns the last line of a block container at the right side.

text-align-last: right;
Try it

center

It aligns the last line at the center of inline axis.

text-align-last: center;
Try it

justify

It justifies the content according to the method specified by the text-justify i.e. the last line exactly fills the line axis.

text-align-last: justify;
Try it

Applicable to

It applies to block containers.