Space Character Article Index for
Space
Website Links For
Space
 

Information About

Space Character




A space character is a Character used to represent a Space . In Proofreading , only em- and en-spaces are represented using this character (which they call an ''em-quad'' or an ''en-quad''), while other types of spaces are represented with a Number Sign.

In Programming Language syntax, spaces are frequently used to explicitly separate Tokens . Aside from this use, spaces and other Whitespace Character s are usually ignored by modern programming languages. Exceptions are Haskell , ABC , and Python , which use the amount of whitespace in indentation to indicate the bounds of a block, and at least one experimental language called Whitespace Programming Language , where whitespaces are the only meaningful syntactical element.

In Word Processor s and Text Editor s, if a line on a screen is shorter than the width of the screen or window, then the empty space to the right usually does not correspond with space characters in the file: there is simply a code indicating that the next text should be put on a new line. Thus, the size of the file is not made unnecessarily larger. If there are space characters, one usually does not see the difference; text editors and word processors often have an option to make them visible. Also, if there is a space character, the cursor can move there, otherwise usually not.


SPACES AND DIGITAL TYPOGRAPHY


In computer Character Encoding s, the normal, general-purpose en-width space is Unicode character (32 decimal). When rendered, it is often considered insignificant when appearing at the end of a line of text, or when part of a sequence of whitespace characters, so it may be omitted or "collapsed" in such circumstances.

The Non-breaking Space , (160 decimal), renders the same as a normal space but is expressly non-collapsible. It is often used to prevent line wrapping or to indent text, though some World Wide Web authorities discourage using it for those purposes.

An and renderer capabilities.

Unicode defines several other space characters with specific semantics and rendering characteristics, as shown in the table below. Depending on the browser and fonts used to view this table, not all spaces may display properly:

Unicode also provides some visible characters to stand in for space when necessary in the "Control Pictures" block: the Symbol For Space (U+2420), the Blank Symbol (U+2422), and the Open Box (U+2423).


Space characters in markup languages


Space characters appearing in inconsequential places within element start tags in both XML and HTML are generally ignored by processors of those markup languages. For example, spaces that appear on either side of the "=" that separates an attribute name from its value have no effect on the interpretation fo the document. Element end tags can contain trailing spaces, and empty-element tags in XML can contain spaces before the "/>".

In XML attribute values, sequences of whitespace characters are treated as a single space when the document is read by a parser {Link without Title} . Whitespace in XML element content is not changed in this way by the parser, but an application receiving information from the parser may choose to apply similar rules to element content. An XML document author can use the xml:space="preserve" attribute on an element to force the parser to discourage the downstream application from altering whitespace in that element's content.

In most has been used to apply pre-like whitespace processing. In such elements, space characters will not be "collapsed" into inter-word separators.

In both XML and HTML, the Non-breaking Space character is not treated as "whitespace", so it is not subject to the rules above.


ZERO-WIDTH SPACE


A zero-width space ​ is usually not visible, but it may expand in passages that are Fully Justified .

In HTML pages this space can be used as a potential line-break in long words as a replacement for the deprecated tag. Since the zero-width space is not supported in all Web Browser s (most notably Internet Explorer ) the following HTML code can be used as a workaround for this purpose:




SEE ALSO




EXTERNAL LINKS