W3C home > Mailing lists > Public > www-validator@w3.org > March 2019

Re: Adding a Language Attribute to the HTML Tag

From: David Dorward <david@dorward.me.uk>
Date: Thu, 07 Mar 2019 09:40:32 +0000
To: Marie <mvjj@aol.com>
Cc: www-validator@w3.org
Message-ID: <D92BF472-28F7-4DC4-950E-654D7A9B9B46@dorward.me.uk>
On 7 Mar 2019, at 7:03, Marie wrote:

> Adding a language attribute to the html tag as one of the following 
> …
> <!DOCTYPE HTML xmlns="http://www.w3.org/1999/xhtml 
> <http://www.w3.org/1999/xhtml>" xml:lang="en" lang="en”> or as …
> <!DOCTYPE HTML
> 	xmlns="http://www.w3.org/1999/xhtml <http://www.w3.org/1999/xhtml>" 
> xml:lang="en" lang="en”>
> keeps giving me the warning …
> Consider adding a lang attribute to the html start tag to declare the 
> language of this document.
> From line 1, column 16; to line 2, column 6 
> <https://validator.w3.org/nu/#l2c6>
> TYPE HTML>↩<HEAD>↩
> What is wrong?


The [Doctype][1]:

   <!DOCTYPE html>

and the [HTML][2] [start tag][3]:

   <html lang="en">

are different things.


[1]: https://www.w3.org/TR/html5/syntax.html#the-doctype
[2]: https://www.w3.org/TR/html5/semantics.html#the-html-element
[3]: https://www.w3.org/TR/html5/syntax.html#start-tags
Received on Thursday, 7 March 2019 09:41:04 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:00:09 UTC