The zero-width space (), abbreviated ZWSP, is a non-printing character used in computerized typesetting to indicate word boundaries to text-processing systems for scripts that do not use explicit spacing, or after characters not followed by a visible space after which there may be a line break.
The zero-width space marks a potential line break without hyphenation; for hyphenated line breaks, a soft hyphen is used. The zero-width space can be used to mark word breaks in languages without visible space between words, such as Thai, Myanmar, Khmer, and Japanese.
Unlike fixed-width spaces, in justified text that increases spacing between letters, characters adjacent to the zero-width space are spaced as if it was not present.
To show the effect of the zero-width space, the following words have been separated with zero-width spaces:
LoremIpsumDolorSitAmetConsecteturAdipiscingElitSedDoEiusmodTemporIncididuntUtLaboreEtDoloreMagnaAliquaUtEnimAdMinimVeniamQuisNostrudExercitationUllamcoLaborisNisiUtAliquipExEaCommodoConsequatDuisAuteIrureDolorInReprehenderitInVoluptateVelitEsseCillumDoloreEuFugiatNullaPariaturExcepteurSintOccaecatCupidatatNonProidentSuntInCulpaQuiOfficiaDeseruntMollitAnimIdEstLaborum
And the following words are not separated with these spaces:
LoremIpsumDolorSitAmetConsecteturAdipiscingElitSedDoEiusmodTemporIncididuntUtLaboreEtDoloreMagnaAliquaUtEnimAdMinimVeniamQuisNostrudExercitationUllamcoLaborisNisiUtAliquipExEaCommodoConsequatDuisAuteIrureDolorInReprehenderitInVoluptateVelitEsseCillumDoloreEuFugiatNullaPariaturExcepteurSintOccaecatCupidatatNonProidentSuntInCulpaQuiOfficiaDeseruntMollitAnimIdEstLaborum
On browsers supporting zero-width spaces, resizing the window will re-break the first text only at word boundaries, while the second text will not be broken at all.
In HTML pages, the HTML element
functions as a zero-width space. In Internet Explorer 6, the zero-width space was not supported in some fonts.
ICANN rules prohibit domain names from containing non-displayed characters, including the zero-width space, and most browsers prohibit their use within domain names because they can be used to create a homograph attack, where a malicious URL is visually indistinguishable from a legitimate one.
The zero-width space character is encoded in Unicode as U+200B ZERO WIDTH SPACE, and input in HTML as ​
,
or
. Contrary to what their names suggest, the character entities ​
, ​
, ​
, and ​
also refer to the zero-width space.
The TeX representation is \hskip0pt
; the LaTeX representation is \hspace{0pt}
; and the groff representation is \:
.
Its semantics and HTML implementation are similar to the soft hyphen, except that soft hyphens display a hyphen character at the point where the line is broken.
This article uses material from the Wikipedia English article Zero-width space, which is released under the Creative Commons Attribution-ShareAlike 3.0 license ("CC BY-SA 3.0"); additional terms may apply (view authors). Content is available under CC BY-SA 4.0 unless otherwise noted. Images, videos and audio are available under their respective licenses.
®Wikipedia is a registered trademark of the Wiki Foundation, Inc. Wiki English (DUHOCTRUNGQUOC.VN) is an independent company and has no affiliation with Wiki Foundation.