Skip to content
Browse files

Add `lang=""` to `<html>`

In the past we decided¹ to remove the `lang` attribute due to the fact
that developers were often forgetting to update its value. This change
turned out not to be the best solution because some of the users:

 * didn't read the documentation, and thus, they found the absence
   of the `lang` attribute confusing, or didn't even knew they had
   to add it

 * didn't notice the absence of the `lang` attribute, and thus, forgot
   to include it (expecting it to be there)

To make things more clearer and to remind users that they need to
specify the primary language of the document, this commit reintroduces
the `lang` attribute, while leaving its value to `""`.

Using `lang=""` has the exact same effect as not specifying the `lang`
attribute at all, in both cases the language being treated as unknown².

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

¹ #1110
² From WHATWG (

  "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 both the lang attribute in no namespace and the lang attribute
   in the XML namespace are set on an element, user agents must use
   the lang attribute in the XML namespace, and the lang attribute in
   no namespace must be ignored for the purposes of determining the
   element's language.

   If neither the node nor any of the node's ancestors, including the
   root element, have either attribute set, but there is a pragma-set
   default language set, then that is the language of the node. If there
   is no pragma-set default language set, then language information from
   a higher-level protocol (such as HTTP), if any, must be used as the
   final fallback language instead. In the absence of any such language
   information, and in cases where the higher-level protocol reports
   multiple languages, the language of the node is unknown, and the
   corresponding language tag is the empty string.

   If the resulting value is not a recognized language tag, then it
   must be treated as an unknown language having the given language tag,
   distinct from all other languages."

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Close #1542.
  • Loading branch information
alrra committed May 13, 2014
1 parent c0ea651 commit d916a720253d171a9b54818f2a07d14acbd2e4c7
Showing with 3 additions and 1 deletion.
  1. +2 −0
  2. +1 −1 index.html
@@ -1,5 +1,7 @@
### HEAD

* Add `lang=""` to `<html>`
* Update to jQuery 1.11.1.
* Update to Modernizr 2.8.0.
* Update to Apache Server Configs 2.3.0.
@@ -1,5 +1,5 @@
<!doctype html>
<html class="no-js">
<html class="no-js" lang="">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

0 comments on commit d916a72

Please sign in to comment.
You can’t perform that action at this time.