Is " " a replacement of " "?

Htmlasp.netVisual Studio-2008Character Encoding

Html Problem Overview


In my ASP.NET application, I was trying to add few white spaces between two text boxes by typing space bar. The equivalent HTML source was   instead of  . So I just wanted to check: is this the new replacement for white space? If yes, any idea why they changed?

Html Solutions


Solution 1 - Html

  •   is the character entity reference (meant to be easily parseable by humans).
  •   is the numeric entity reference (meant to be easily parseable by machines).

They are the same except for the fact that the latter does not need another lookup table to find its actual value. The lookup table is called a DTD, by the way.

You can read more about character entity references in the offical W3C documents.

Solution 2 - Html

Those do both mean non-breaking space, yes.   is another synonym, in hex.

Solution 3 - Html

  is the numeric reference for the entity reference   — they are the exact same thing. It's likely your editor is simply inserting the numberic reference instead of the named one.

See the Wikipedia page for http://en.wikipedia.org/wiki/Non-breaking_space">the non-breaking space.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAnto VargheseView Question on Stackoverflow
Solution 1 - HtmlIgnacio Vazquez-AbramsView Answer on Stackoverflow
Solution 2 - HtmlJALView Answer on Stackoverflow
Solution 3 - Htmljosh3736View Answer on Stackoverflow