Html 是“ ” 替换“ ”?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3274315/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is " " a replacement of " "?
提问by Antoops
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?
在我的 ASP.NET 应用程序中,我试图通过键入空格键在两个文本框之间添加几个空格。等效的 HTML 源代码 
不是
. 所以我只是想检查一下:这是空白的新替代品吗?如果是,知道他们为什么改变吗?
回答by Ignacio Vazquez-Abrams
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.
它们是相同的,只是后者不需要另一个查找表来查找其实际值。顺便说一下,查找表称为DTD。
You can read more about character entity references in the offical W3C documents.
您可以在W3C 官方文档中阅读有关字符实体引用的更多信息。
回答by JAL
Those do both mean non-breaking space, yes.  
is another synonym, in hex.
这些都意味着不间断的空间,是的。 
是另一个同义词,以十六进制表示。
回答by josh3736
 
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.
有关不间断空格的信息,请参阅维基百科页面。