Reputation: 41
My HTML tag specifies lang="en"
, but there are a lot of proper names in the document. These are such things as surnames, which the validator flags as spelling mistakes. I'd like to put them in a <span>
with lang="none"
for example. Is there a correct way of doing this (i.e. one which validates as correct HTML?
Upvotes: 4
Views: 45
Reputation: 64657
The correct way to do it is to set the attribute to an empty string
<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.
Upvotes: 1