CSS properties - hanging-punctuation

revision:


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.

CSS syntax : hanging-punctuation: none | first | last | allow-end | force-end | initial | inherit;

Property values:

none : no punctuation mark may be placed outside the line box at the start or at the end of a full line of text

first : punctuation may hang outside the start edge of the first line

last : punctuation may hang outside the end edge of the first line

allow-end : punctuation may hang outside the end edge of all lines if the punctuation does not otherwise fit prior to justification

force-end : punctuation may hang outside the end edge of all lines. If justification is enabled on this line, then it will force the punctuation to hang.

initial : sets this property to its default value.

inherit : inherits this property from its parent element.

JavaScript syntax: object.style.hangingPunctuation="first"

example: hanging-punctuation property
code:
                    <style>
                    p {hanging-punctuation: first;}
                    </style>