How to create small SPACES in HTML?

user89021 picture user89021 · Apr 27, 2010 · Viewed 37.9k times · Source

There is em dash and en dash. Is there an "en" equivalent to   ? Is there an en equivalent to pure Ascii 32?

I want a better way to write this:

123<span class="spanen">&nbsp;</span>456<span class="spanen">&nbsp;</span>789

or this:

123<span class="spanen"> </span>456<span class="spanen"> </span>789

Answer

knittl picture knittl · Apr 27, 2010

&thinsp; (thin space) should do

Note that &nbsp; has not the same with as an &mdash; (—); to separate numbers you should use a narrow no-break space (U+202F).

As others have mentioned, you are better off using the CSS property word-spacing to define the width of your spaces. it's probably a good idea to combine it with white-space:nowrap;