Template:Indent/doc

The template performs a newline and indents by a specified number of spaces. However, the spaces are not all the same size, but rather a mixture of en-size & em-size spaces that have been tested to work on a wide range of browsers.

To skip by n equal-size spaces, instead use n, which puts all as the standard-size non-breaking space and does not force a newline.

Usage

 * 1) of spaces

The indentation generated by 5 will match that provided by  in a description list—a technique which should generally not be used to indent text. To match, use 10. This may vary depending on your browser.

Examples
The following are detailed examples, also comparing to the equivalent indentation generated if a colon-shift  were used instead.

Note that if the prior line is already colon-shifted text, then using "5" generates a blank line first, so instead, use "5" (or such) after a colon-shifted line.

Analysis of uneven spacing
As computers optimize code, they occasionally risk displaying unsavory results after condensing monotonous strings of characters (such as spaces). Thus, many templates around Wiki choose to avoid this hurdle by alternating different types of spaces (with the intention of displaying no differently than regular spaces).

Spaces come in two main size varieties: em spaces and en spaces. Em spaces are generally defined as the width of one character, and en spaces exactly half that size. However, there is no requirement that browsers conform to this standard, and so templates that code in en spaces  not display uniformly across all browsers. Neither indent nor spaces use em spaces, but rather mix en and em spaces, whereas n avoids en spaces altogether and will actually skip n count of spaces, as if inserting n repetitions of an em space. This is done by alternating em spaces with an em-size non-breaking —by definition, it must be the same—in order to skip a wide area.

History
This template originated on the sister project Wikisource (main page), and was subsequently ported to English Wikipedia at 21:27, 26 May 2006 (UTC).