text-align-last


text-align-last controls the alignment of the last line of text. This property is particularly useful when working with justified text, as shown in the following examples.

text-align-last: right

Ancient Rome

In modern historiography, ancient Rome is the Roman civilisation from the founding of the Italian city of Rome in the 8th century BC to the collapse of the Western Roman Empire.

p {
    text-align: justify;
    text-align-last: right;
    hyphens: auto;
    text-wrap: pretty;
}

text-align-last: center

In modern historiography, ancient Rome is the Roman civilisation from the founding of the Italian city of Rome in the 8th century BC to the collapse of the Western Roman Empire.

p {
    text-align: justify;
    text-align-last: center;
    hyphens: auto;
    text-wrap: pretty;
}