Re: <html> change

On Tue, 7 Aug 2007, Jens Brueckmann wrote:

>> a month ago a document with a root element of <html> passed Xhtml
>> validation, now it requires
>> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
>> Not a large change for one or a dozen pages.....
>
> the namespace attribute always was required for strictly conforming
> documents, see http://www.w3.org/TR/xhtml1/normative.html#strict

To avoid potential confusion, I'd like to remark that the xml:lang and 
lang attributes are not required by any HTML specification. They appear in 
an _example_ in the specification, but they are optional by the syntax 
rules (and the prose) in the HTML specs.

Quite apart from this, such attributes are required for conformance to 
the Web Content Accessibility Guidelines (WCAG) recommendation. But 
validators don't check such things.

Regarding the xmlns attribute, it hardly has any impact on any browser, 
indexing robot, or other important software on the Web. So you can choose 
to add it to get a clean validation report (why?) or to ignore the 
validator's messages about it. Adding it is practically relevant only if 
you wish to be prepared to namespace-aware XML processors playing with 
your documents.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

Received on Tuesday, 7 August 2007 19:37:17 UTC