Share on Facebook Share on Twitter Email
Answers.com

Whitespace

 

(1) Unused electromagnetic spectrum between TV channels. Originally set up as protection bands to eliminate interference, wireless microphones used in theaters and other venues have employed this spectrum. See White Spaces Coalition.

(2) Any area on a document page that does not contain text or graphics. Also called "negative space," the term was derived from printing paper, which was typically white, and any part of the paper not printed remained white. To a graphic designer whose goal is to render a pleasing result, white space is as important as the printed areas.

(3) Non-printing characters. Applications treat white space differently. For example, in word processing, each depression of the space bar generates one blank space character (ASCII 32), and each blank space character is displayed as one blank space (rather logical).

On Web pages (HTML pages), multiple, contiguous space characters are treated as a single character of white space (not so logical). In order to actually display several blank spaces in a row, a non-breaking HTML code must be used instead of multiple space characters.

(4) A void in service; for example, white spaces in the cellular industry are geographic areas without coverage.

Download Computer Desktop Encyclopedia to your iPhone/iTouch

Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics
Wikipedia: Whitespace (computer science)
Top


In computer science, whitespace is any single character or series of characters that represents horizontal or vertical space in typography. When rendered, a whitespace character does not correspond to a visual mark, but typically does occupy an area on a page. For example, the common whitespace symbol " " (the Unicode character at the 32nd code point) represents a blank space, as used between words and sentences in Western scripts.

The term whitespace is based on the assumption that the background color used for rendered text is white, and is thus confusing if it is not.

Contents

Definition and ambiguity

As is common in technical literature, the two words "white space" have found widespread usage as the single term "whitespace", especially when used as an adjective, as in "whitespace character". Some specifications refer to "white space" while others refer to "whitespace"; there is no difference between the terms, although exactly which characters are being referred to does vary from context to context. For example, the form feed character is "whitespace" in HTML, but is not "white space" in XML.

The most common whitespace characters may be typed via the space bar or the Tab key. Depending on context, a line-break generated by the Return key (Enter key) may be considered whitespace as well.

Unicode

In Unicode (Unicode Character Database) the following codepoints are defined as whitespace:

  • U+0009–U+000D (control characters, containing Tab, CR and LF)
  • U+0020 SPACE
  • U+0085 NEL (control character next line)
  • U+00A0 NBSP (NO-BREAK SPACE)
  • U+1680 OGHAM SPACE MARK
  • U+180E MONGOLIAN VOWEL SEPARATOR
  • U+2000–U+200A (different sorts of spaces)
  • U+2028 LS (LINE SEPARATOR)
  • U+2029 PS (PARAGRAPH SEPARATOR)
  • U+202F NNBSP (NARROW NO-BREAK SPACE)
  • U+205F MMSP (MEDIUM MATHEMATICAL SPACE)
  • U+3000 IDEOGRAPHIC SPACE

Usage

Programming Languages

Runs of whitespace occurring within source code written in computer programming languages are generally ignored; such languages are free-form. But, for example, in Haskell and Python, whitespace and indentation are used for syntactical purposes. And in Whitespace, whitespaces are the only valid characters for programming, while any other characters are ignored.

Still, for most programming languages, abundant use of whitespace, especially trailing whitespace at the end of lines, is considered a nuisance. In interpreted languages, parsing of unnecessary whitespace may affect the speed of execution. In markup languages like HTML, unnecessary whitespace increases the file size, and may so affect the speed of transfer over a network. On the other hand, unnecessary whitespace can also inconspicuously mark code, similar to, but less obvious than comments in code. This can be desirable to prove an infringement of license or copyright that was committed by copying and pasting.

The C language defines whitespace to be "... space, horizontal tab, new-line, vertical tab, and form-feed". The HTTP network protocol has very strict requirements about what type of whitespace can occur in the control structures (such as the header fields) and where it must and must not occur.

Literature

On some occasions, such as a textbook on the Modula-2 computer language published ca. 1985 by Springer-Verlag, it is necessary to explicitly show a symbol to indicate a space code. That book, at least, used the symbol ␣ (Unicode U+2423, decimal 9251, OPEN BOX) to show an explicit space code. (In case it doesn't render well on a monitor screen, it's like a ] (closing square bracket) rotated a quarter-turn clockwise, although not as wide, and placed below the writing line. Some fonts render it too narrowly.)

File names

Such usage is similar to multiword file names written for operating systems and applications that are confused by embedded space codes—such file names instead use an underscore (_) as a word separator, as_in_this_phrase.

Another such symbol was ␢ (Unicode U+2422, decimal 9250, LATIN SMALL B WITH STROKE). This was used in the early years of computer programming (especially by IBM?) when writing on coding forms. Keypunch operators immediately recognized the symbol as an "explicit space".

See also

External links


 
 
Learn More
Python (computer jargon)
sitename (computer jargon)
Whitespace (programming language)

How do you remove the whitespaces above and below the list items that come when we create a UL in HTML? Read answer...
What is whitespace? Read answer...
What is whitespace in java program? Read answer...

Help us answer these
An example of whitespace character is a?
Example of a whitespace character?

Post a question - any question - to the WikiAnswers community:

 

Copyrights:

Computer Desktop Encyclopedia. THIS COPYRIGHTED DEFINITION IS FOR PERSONAL USE ONLY.
All other reproduction is strictly prohibited without permission from the publisher.
© 1981-2009 Computer Language Company Inc.  All rights reserved.  Read more
Wikipedia. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article "Whitespace (computer science)" Read more