Various space character entities in HTML

I wanted to know how to write a normal space character with a character entity, so I checked the spec. at W3C. It listed four space entities ...
  •   - non-breakable space
  •   - en space
  •   - em space
  •   - thin space
The first one (nbsp) is trivial: if you put several such entities together, than the renderer (~browser) will not break the line among these spaces. The second one (ensp) is the normal space character, but written as an entity. The third one (emsp) is an emphasized space, which means a wider than normal space. The fourth one (thinsp) is the opposite: a thinner than normal space character.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

As always, Wikipedia is a

As always, Wikipedia is a good source for information. I browse the typographic articles quite often. For example I tend to forget the shape of Hungarian inner quotation marks.

Re: As always, Wikipedia is

It is indeed, but here the specification is the most accurate source on the HTML standard. Eg. the Wikipedia article lists the Zero Width Space (ZWSP, U+200B, ​) among the available Unicode space characters and mentions that IE does not support it. Actually this entity is not part of the HTML 4.01 specification so in my case it cannot be used at all (since my HTML output -actually it's MRTG's- is not Unicode). But to be honest, I was looking for something like the ZWSP since I had to put some text into a variable to override a default value, but I wanted that nothing is displayed for that variable at all. A zero width space would be ideal for that purpose, but I've to settle for thin space for now.

En space

Note that an en space is wider than a normal space (it's not just a normal space written as an entity), but is not as wide as an em space.