hanging-punctuation property CSS Reference



Definition and Usage

The hanging-punctuation property specifies whether a punctuation mark may be placed outside the line box at the start or at the end of a full line of text.

Default value:none
Inherited:yes
Version:CSS3
JavaScript syntax: object.style.hangingPunctuation="first"

Syntax

hanging-punctuation: none|first|last|allow-end|force-end;

Values

ValueDescription
noneNo punctuation mark may be placed outside the line box at the start or at the end of a full line of text
firstPunctuation may hang outside the start edge of the first line
lastPunctuation may hang outside the end edge of the last line
allow-endPunctuation may hang outside the end edge of all lines if the punctuation does not otherwise fit prior to justification
force-endPunctuation may hang outside the end edge of all lines. If justification is enabled on this line, then it will force the punctuation to hang

Examples

p {
    hanging-punctuation:first;
}

Relative articles