J u m p t o c o n t e n t
M a i n m e n u
M a i n m e n u
N a v i g a t i o n
● M a i n p a g e
● C o n t e n t s
● C u r r e n t e v e n t s
● R a n d o m a r t i c l e
● A b o u t W i k i p e d i a
● C o n t a c t u s
● D o n a t e
C o n t r i b u t e
● H e l p
● L e a r n t o e d i t
● C o m m u n i t y p o r t a l
● R e c e n t c h a n g e s
● U p l o a d f i l e
S e a r c h
Search
A p p e a r a n c e
● C r e a t e a c c o u n t
● L o g i n
P e r s o n a l t o o l s
● C r e a t e a c c o u n t
● L o g i n
P a g e s f o r l o g g e d o u t e d i t o r s l e a r n m o r e
● C o n t r i b u t i o n s
● T a l k
( T o p )
1
U s a g e
T o g g l e U s a g e s u b s e c t i o n
1 . 1
S y n t a x
1 . 2
C o n t r o l l i n g l i n e - b r e a k i n g i n i n f o b o x e s
2
C o m p a r i s o n s
3
T e m p l a t e d a t a
4
S e e a l s o
T o g g l e t h e t a b l e o f c o n t e n t s
T e m p l a t e : S p a c e s
1 4 1 l a n g u a g e s
● A f r i k a a n s
● А ԥ с ш ә а
● ا ل ع ر ب ي ة
● অ স ম ী য ় া
● A s t u r i a n u
● A z ə r b a y c a n c a
● ت ۆ ر ک ج ه
● B a s a B a l i
● ব া ং ল া
● 閩 南 語 / B â n - l â m - g ú
● B a s a B a n y u m a s a n
● Б а ш ҡ о р т с а
● Б е л а р у с к а я
● Б е л а р у с к а я ( т а р а ш к е в і ц а )
● भ ो ज प ु र ी
● Б ъ л г а р с к и
● B o s a n s k i
● Б у р я а д
● C a t a l à
● Ч ӑ в а ш л а
● C e b u a n o
● Č e š t i n a
● C o r s u
● C y m r a e g
● D a n s k
● ا ل د ا ر ج ة
● ދ ި ވ ެ ހ ި ބ ަ ސ ް
● D o l n o s e r b s k i
● E e s t i
● Ε λ λ η ν ι κ ά
● Э р з я н ь
● E s p a ñ o l
● E s p e r a n t o
● E u s k a r a
● ف ا ر س ی
● F ø r o y s k t
● F r a n ç a i s
● G a e i l g e
● G a e l g
● G a g a u z
● G a l e g o
● Г Ӏ а л г Ӏ а й
● ગ ુ જ ર ા ત ી
● G u n g b e
● 客 家 語 / H a k - k â - n g î
● 한 국 어
● H a u s a
● Հ ա յ ե ր ե ն
● ह ि न ् द ी
● H o r n j o s e r b s c e
● I l o k a n o
● B a h a s a I n d o n e s i a
● I n t e r l i n g u a
● И р о н
● I s i X h o s a
● Í s l e n s k a
● I t a l i a n o
● ע ב ר י ת
● ქ ა რ თ უ ლ ი
● K a s z ë b s c z i
● I k i r u n d i
● K r e y ò l a y i s y e n
● K u r d î
● К ы р г ы з ч а
● L a d i n
● L a d i n o
● L a t v i e š u
● Л е з г и
● L i g u r e
● M a g y a r
● M a d h u r â
● म ै थ ि ल ी
● М а к е д о н с к и
● M a l a g a s y
● മ ല യ ാ ള ം
● M a l t i
● M ā o r i
● म र ा ठ ी
● მ ა რ გ ა ლ უ რ ი
● م ص ر ى
● ဘ ာ သ ာ မ န ်
● B a h a s a M e l a y u
● 閩 東 語 / M ì n g - d ĕ ̤ n g - n g ṳ ̄
● М о к ш е н ь
● မ ြ န ် မ ာ ဘ ာ သ ာ
● N a V o s a V a k a v i t i
● न े प ा ल ी
● 日 本 語
● Н о х ч и й н
● N o r f u k / P i t k e r n
● N o r s k b o k m å l
● N o r s k n y n o r s k
● N o v i a l
● ଓ ଡ ଼ ି ଆ
● O ʻ z b e k c h a / ў з б е к ч а
● ਪ ੰ ਜ ਾ ਬ ੀ
● P a n g a s i n a n
● پ ښ ت و
● ភ ា ស ា ខ ្ ម ែ រ
● T o k P i s i n
● P o l s k i
● P o r t u g u ê s
● R o m â n ă
● Р у с с к и й
● С а х а т ы л а
● G a g a n a S a m o a
● स ं स ् क ृ त म ्
● S c o t s
● S e s o t h o s a L e b o a
● S h q i p
● ස ි ං හ ල
● S i m p l e E n g l i s h
● س ن ڌ ي
● S l o v e n č i n a
● S l o v e n š č i n a
● ک و ر د ی
● С р п с к и / s r p s k i
● S r p s k o h r v a t s k i / с р п с к о х р в а т с к и
● S u o m i
● S v e n s k a
● T a g a l o g
● த ம ி ழ ்
● T a c l ḥ i t
● Т а т а р ч а / t a t a r ç a
● ၽ ႃ ႇ သ ႃ ႇ တ ႆ း
● త ె ల ు గ ు
● ไ ท ย
● Т о ҷ и к ӣ
● T ü r k ç e
● T ü r k m e n ç e
● У к р а ї н с ь к а
● ا ر د و
● V è n e t o
● T i ế n g V i ệ t
● V o l a p ü k
● 吴 语
● י י ִ ד י ש
● Y o r ù b á
● 粵 語
● Z a z a k i
● 中 文
E d i t l i n k s
● T e m p l a t e
● T a l k
E n g l i s h
● R e a d
● V i e w s o u r c e
● V i e w h i s t o r y
T o o l s
T o o l s
A c t i o n s
● R e a d
● V i e w s o u r c e
● V i e w h i s t o r y
G e n e r a l
● W h a t l i n k s h e r e
● R e l a t e d c h a n g e s
● U p l o a d f i l e
● S p e c i a l p a g e s
● P e r m a n e n t l i n k
● P a g e i n f o r m a t i o n
● G e t s h o r t e n e d U R L
● D o w n l o a d Q R c o d e
● W i k i d a t a i t e m
P r i n t / e x p o r t
● D o w n l o a d a s P D F
● P r i n t a b l e v e r s i o n
I n o t h e r p r o j e c t s
● W i k i m e d i a C o m m o n s
● M e t a - W i k i
● W i k i s p e c i e s
● W i k i q u o t e
● W i k i s o u r c e
● W i k i v e r s i t y
● W i k t i o n a r y
A p p e a r a n c e
F r o m W i k i p e d i a , t h e f r e e e n c y c l o p e d i a
( R e d i r e c t e d f r o m T e m p l a t e : N b s )
{{nbsp }}
{{nbsp; }}
{{space }}
{{spcs }}
This template is used on approximately 588,000 pages, or roughly 1% of all pages . To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage . The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them.
This template uses Lua :
A template to produce one or more non-breaking spaces (
character entities), or another type of spaces.
Usage
Syntax
{{spaces|N |type }}
produces N consecutive non-breaking spaces (where N is a whole number larger than zero) of the type specified by the second parameter (which are ordered by decreasing space width): em
, fig
, en
, thin
, hair
. If type is not specified, N non-breaking spaces (
) are produced. A non-breaking space has the same width as a standard space, whose width is between the width of en
and thin
.
{{spaces|type }}
produces a single non-breaking space of the type indicated.
Controlling line-breaking in infoboxes
This template, usually as its alias {{nbsp }}
, may be used with {{wbr }}
and {{nowrap }}
to control line-breaking in bulletless lists in infoboxes, to prevent wrapped long entries from being confused with multiple entries. See Template:Wbr/doc#Controlling line-breaking in infoboxes for details.
Comparisons
Name (alias)
→
Instance←
Example code and ...
Using {{ spaces }}
Output
Output {{ spaces }}
none
→
←
Text< ref > ...</ ref >
''Text'' < ref > ...</ ref >
Text[1 ] Text [2 ]
Hair (Very thin)
→
←
Text{{ hair space }}< ref > ...</ ref >
''Text'' {{ hair space }}< ref > ...</ ref >
Text{{spaces|hair}}<ref>...</ref>
Text [1 ] Text [2 ]
Text [1 ] Text [2 ]
2-pixel
→
←
Text{{ px2 }}< ref > ...</ ref >
''Text'' {{ px2 }}< ref > ...</ ref >
Text [1 ] Text [2 ]
Narrow no-break
→
←
Text{{ narrow no-break space }}< ref > ...</ ref >
''Text'' {{ narrow no-break space }}< ref > ...</ ref >
Text [1 ] Text [2 ]
Thin
→
←
Text{{ thin space }}< ref > ...</ ref >
''Text'' {{ thin space }}< ref > ...</ ref >
Text{{spaces|thin}}<ref>...</ref>
Text [1 ] Text [2 ]
Text [1 ] Text [2 ]
Standard[a]
→
←
Text < ref > ...</ ref >
''Text'' < ref > ...</ ref >
Text{{spaces}}<ref>...</ref>
Text [1 ]
Text [1 ] Text [2 ]
En
→
←
1   3
1{{spaces|en}}3
1 3
1 3
Figure
→
←
123< br /> 1 {{ figure space }} 3
123<br/>1{{spaces|fig}}3
1231 3
1231 3
Em
→
←
1   3
1{{spaces|em}}3
1 3
1 3
Template data
Template parameters[ Edit template data ]
Parameter Description Type Status Quantity 1
How many non-breaking spaces to insert
Default
1
Number optional Type 2
Non-default types (in decreasing order of width): em, fig, en, thin, hair
Suggested values
em
fig
en
nbsp
thin
hair
Default
String optional
See also
t
e
Non-breaking space characters
Breaking space characters
Non-character spaces
R e t r i e v e d f r o m " https://en.wikipedia.org/w/index.php?title=Template:Spaces&oldid=687408551 "
C a t e g o r i e s :
● T e m p l a t e s b a s e d o n t h e S t r i n g L u a m o d u l e
● I n l i n e s p a c i n g t e m p l a t e s
● C h a r a c t e r t e m p l a t e s
H i d d e n c a t e g o r i e s :
● W i k i p e d i a f u l l y p r o t e c t e d t e m p l a t e s
● T e m p l a t e s n o t s a f e f o r u s e i n c i t a t i o n t e m p l a t e s
● W i k i p e d i a n e v e r s u b s t i t u t e d t e m p l a t e s
● T e m p l a t e s u s i n g T e m p l a t e D a t a
● T h i s p a g e w a s l a s t e d i t e d o n 2 5 O c t o b e r 2 0 1 5 , a t 1 1 : 3 8 ( U T C ) .
● T e x t i s a v a i l a b l e u n d e r t h e C r e a t i v e C o m m o n s A t t r i b u t i o n - S h a r e A l i k e L i c e n s e 4 . 0 ;
a d d i t i o n a l t e r m s m a y a p p l y . B y u s i n g t h i s s i t e , y o u a g r e e t o t h e T e r m s o f U s e a n d P r i v a c y P o l i c y . W i k i p e d i a ® i s a r e g i s t e r e d t r a d e m a r k o f t h e W i k i m e d i a F o u n d a t i o n , I n c . , a n o n - p r o f i t o r g a n i z a t i o n .
● P r i v a c y p o l i c y
● A b o u t W i k i p e d i a
● D i s c l a i m e r s
● C o n t a c t W i k i p e d i a
● C o d e o f C o n d u c t
● D e v e l o p e r s
● S t a t i s t i c s
● C o o k i e s t a t e m e n t
● M o b i l e v i e w