Skip to main content Skip to docs navigation

Whitespace

Whitespace refers to characters which are used to provide horizontal or vertical space between other characters. Whitespace is often used to separate tokens in HTML , CSS , JavaScript , and other computer languages.

On this page

Whitespace

Whitespace characters and their usage vary among languages.

In HTML

The Infra Living Standard defines five characters as "ASCII whitespace": U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, and U+0020 SPACE.

In JavaScript

The ECMAScript Language Specification defines several Unicode code points as "white space": U+0009 CHARACTER TABULATION <TAB >, U+000B LINE TABULATION <VT >, U+000C FORM FEED <FF >, U+0020 SPACE <SP >, U+00A0 NO-BREAK SPACE <NBSP >, U+FEFF ZERO WIDTH NO-BREAK SPACE <ZWNBSP >, and any other Unicode "Space_Separator" code points <USP >.

See also

Updated on April 20, 2024 by Datarist.