Is “ ” a replacement of “ ”?

后端 未结 3 1443
情话喂你
情话喂你 2021-01-30 05:53

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

相关标签:
3条回答
  • 2021-01-30 06:29

      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 the non-breaking space.

    0 讨论(0)
  • 2021-01-30 06:39
    •   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.

    0 讨论(0)
  • 2021-01-30 06:39

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

    0 讨论(0)
提交回复
热议问题