Template:Space/doc
From MozillaWiki
Usage
{{space}} inserts a non-breaking space, or any specified space character available in the template, at the position where the template is placed.
The template is especially useful when you use several languages on the same page, or when you need to conform to a certain format in order to present something.
The default action is to include a non-breaking space.
Parameters
There is only 1 parameter, which is unnamed and optional.
Syntax
The template's syntax is
-
{{space|character value }}
To insert a non-breaking space, you don't need to enter any parameter. Just type
-
{{space}}
Optional parameter
1
- Character value
You can insert any of the available space- and format characters, by entering the appropriate value (see Available values, below). This parameter is unnamed, so no parameter name has to be included.
- Note
- If the given value is invalid, the template will insert a non-breaking space.
- Usage
-
{{space|1}}
Available values
Group | Character | Value | |
---|---|---|---|
Main | Alternative | ||
Spaces | Space (regular space) | sp | space |
No-break space | TEMPLATE DEFAULT | ||
Ogham space mark | ospm | ogham | |
En quad | enq | enquad | |
Em quad | emq | emquad | |
En space (nut) | en | ensp | |
Em space (mutton) | em | emsp | |
Three-per-em space (thick space) | tpem | thick | |
Four-per-em space (mid space) | fpem | mid | |
Six-per-em space | spem | ||
Figure space | fsp | figure | |
Punctuation space | psp | punctuation | |
Thin space | tsp | thin | |
Hair space | hsp | hair | |
Narrow no-break space | nnbsp | narrow | |
Medium mathematical space | mmsp | math | |
Ideographic space | idsp | ideographic | |
Ideographic half fill space | idhfsp | half-fill | |
Format | Mongolian vowel separator | mvs | |
Word joiner | wj | ||
Zero width space | zwsp | ||
Zero width non joiner | zwnj | ||
Zero width joiner | zwj | ||
Zero width no-break space w. BOM | zwnbsp |
Examples
Character descriptions
Spaces
Name | Width | Break | Dec | Comments |
---|---|---|---|---|
Space (regular space) | Yes |   |
||
No-break space | No |   |
||
Ogham space mark | Yes |   |
Glyph is blank in fonts lacking the stemline | |
En quad | Yes |   |
||
Em quad | Yes |   |
||
En space (nut) | Yes |   |
||
Em space (mutton) | Yes |   |
||
Three-per-em space (thick space) | Yes |   |
||
Four-per-em space (mid space) | Yes |   |
||
Six-per-em space | Yes |   |
||
Figure space | No |   |
||
Punctuation space | Yes |   |
||
Thin space | Yes |   |
||
Hair space | Yes |   |
||
Narrow no-break space | No |   |
||
Medium mathematical space (MMSP) | Yes |   |
||
Ideographic space | Yes |   |
CJK | |
Ideographic half fill space | 〿 | Yes | 〿 |
CJK; visual indicator of a screen space for half of an ideograph |
Format characters
Name | Width | Break | Dec | Comments |
---|---|---|---|---|
Mongolian vowel separator (MVS) | zero |
Yes | ᠎ |
Mongolian format control character |
Word joiner (WJ) | zero |
No | ⁠ |
|
Zero width space (ZWSP) | zero |
Yes | ​ |
|
Zero width non-joiner (ZWNJ) | zero |
Yes | ‌ |
|
Zero width joiner (ZWJ) | zero |
Yes | ‍ |
|
Zero width no-break space (with BOM) | zero |
No |  |
Arabic; only for detection of byte order; for indicating non-breaking, use word joiner. |
Correct use
Case | What you type | What you see | Comments |
---|---|---|---|
No parameter | Separate {{space}} words |
Separate words | Inserts a non-breaking space |
1 | em}}more {{space|idsp}} separate {{space|nnbsp}} words |
Even more separate words |
Fallback
Case | What you type | What you see | Comments |
---|---|---|---|
1 | sushi}}words |
Separate words | Falls back to inserting a non-breaking space |
See also
- {{nb}}: Inserts up to 10 non-breaking space characters.
- {{sp}}: Inserts a single, regular space character. For use in templates, parser functions, and tables.