A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/css/properties/text-align-last below:

text-align-last · WebPlatform Docs

text-align-last Summary

The text-align-last CSS property describes how the last line of a block element or a line before line break is aligned in its parent block element.

Overview table
Initial value
auto
Applies to
block containers
Inherited
Yes
Media
visual
Computed value
specified value
Animatable
No
CSS Object Model Property
textAlignLast
Syntax Values
auto
Default. Text is aligned like the other lines in the object, using the value of the text-align property.
start
The same as left if direction is left-to-right and right if direction is right-to-left.
end
The same as right if direction is left-to-right and left if direction is right-to-left.
left
Text is aligned to the left.
right
Text is aligned to the right.
center
The text is centered within the line box.
justify
Text is justified if ‘text-justify’ is ‘distribute’, and the same as start value if otherwise.
Examples

The following example shows an embedded style rule that justifies all the lines in the document’s p elements. This is sometimes found in East Asian typography.

<p class="normal">Simple example with "auto" value of text-align-last property. This paragraph needs to be really long in order to show how to work with text-align-last property. It only works because we set a width for this paragraph though.</p>

<p class="justified">Simple example with "justify" value of text-align-last property. In this case, the last line is also justified. This paragraph needs to be really long in order to show how to work with text-align-last property.</p>

View live example

.normal {
    width: 300px;
    text-align: justify;
    text-align-last: auto;
}

.justified {
    width: 300px;
    text-align: justify;
    text-align-last: justify;
}
Related specifications
CSS Text Module Level 3
W3C Working Draft
See also Other articles Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4