我的 HTML标签指定lang =“en”,但文档中有许多专有名称.这些是诸如姓氏之类的东西,验证者将其标记为拼写错误.我想将它们放在< span>中以lang =“none”为例.有没有正确的方法(即一个验证为正确的HTML? 最佳答案 正确的方法是将属性设置为空字符串
<span lang="">...</span>
To determine the language of a node, user agents must look at the nearest ancestor element (including the element itself if the node is an element) that has a lang attribute in the XML namespace set or is an HTML element and has a lang in no namespace attribute set. That attribute specifies the language of the node (regardless of its value).
If the resulting value is the empty string, then it must be interpreted as meaning that the language of the node is explicitly unknown.
HTML5 Spec