Zero-Width Space

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.

Purpose

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.

Example

To show the effect of the zero-width space, the following words have been separated with zero-width spaces:

Lorem​Ipsum​Dolor​Sit​Amet​Consectetur​Adipiscing​Elit​Sed​Do​Eiusmod​Tempor​Incididunt​Ut​Labore​Et​Dolore​Magna​Aliqua​Ut​Enim​Ad​Minim​Veniam​Quis​Nostrud​Exercitation​Ullamco​Laboris​Nisi​Ut​Aliquip​Ex​Ea​Commodo​Consequat​Duis​Aute​Irure​Dolor​In​Reprehenderit​In​Voluptate​Velit​Esse​Cillum​Dolore​Eu​Fugiat​Nulla​Pariatur​Excepteur​Sint​Occaecat​Cupidatat​Non​Proident​Sunt​In​Culpa​Qui​Officia​Deserunt​Mollit​Anim​Id​Est​Laborum

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.

Usage

HTML

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.

Prohibition in domain names

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.

Encoding

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.

See also

References

Citations

Sources

Tags:

Zero-Width Space PurposeZero-Width Space UsageZero-Width Space EncodingZero-Width SpaceControl characterLine wrap and word wrapSpace (punctuation)Typesetting

🔥 Trending searches on Wiki English:

Sunny LeoneWWEJohn BlackthorneCandidates Tournament 2024Amanda BynesBlack holeVideoThe Idea of YouRiley KeoughCoachellaUnited Airlines Flight 232Adolf HitlerNarendra ModiMeta PlatformsRwandan genocideWolfgang Amadeus MozartInstagramMillie Bobby BrownMoonJoseph StalinTaylor Swift albums discographyBarbara EdenGoogle ScholarMaltaMonkey Man (film)Real Madrid CFPatten (shoe)Boy Kills WorldEl ClásicoRon WeasleyAlec BaldwinMichael JacksonIndiaArticle 370 of the Constitution of IndiaWorld Wide WebElla PurnellJamie VardyCassandra NovaWilliam, Prince of WalesNorth KoreaVladimir PutinVoice of VietnamImmaculate (2024 film)Jessica Williams (actress)VietnamTyler BertuzziNetflixNazi GermanyThe Lord of the RingsAndrew Davis (conductor)Mount TakaheKaren McDougal2024Fighter (2024 film)Knuckles (TV series)Eiza GonzálezGrey's AnatomyJosh O'ConnorHow the West Was Won (film)Shōgun (novel)Godzilla Minus OneGiovanni VinciThree-body problemKalki 2898 ADPoor Things (film)Trap (2024 film)World Chess Championship 2024Zhang KangyangManchester City F.C.WordleArj BarkerRaindrop cakeSt. Vincent (musician)X-Men '97Bridge to Terabithia (2007 film)The Big Bang TheoryFallout 42024 Formula One World Championship🡆 More