[html5] 4.01 vs XHTML

Jukka K. Korpela jukka.k.korpela at kolumbus.fi
Sun Oct 14 22:52:53 PDT 2012

2012-10-15 0:42, Bjartur Thorlacius wrote:
> David Osborne wrote:
>> If I am writing in Html 4.01... is this really bad...??
>> When I put in the declaration of which type of HTML - 4.01 transitional
>> show how old my software is...?
> HTML 4.01 is fine if you don't need any of the new features of HTML 5.

You can in practice use an HTML 4.01 doctype even if you use the new 
features of HTML5, even though HTML5 tells that you should not do that. 
Support to new features does not depend on the doctype declaration.

The practical problem is in validation. If you use new HTML5 features 
and some features declared obsolete in HTML5, you cannot get a clean 
validator report without making your own validator, or at least your own 
DTD. But validation is not obligatory; it's a tool, not an end.

> Most importantly, not using elements such as <nav> may make your site 
> less accessible.

Is there a single piece of evidence of such things actually happening? I 
mean browsers or assistive software really paying attention to <nav> 
markup, and in a useful way at that? There are things they could do with 
some new HTML5 elements to improve accessibility, but just saying they 
could does not make it happen.

>> XHTML - what is the difference between it and html 4.01??
> There are slight syntactical and extensibility differences. If you 
> don't need the extensibility of XHTML (which you probably can't quite 
> leverage anyway), you should probably stick with HTML. The WHATWG is 
> essentially deprecating XHTML for most purposes.
I think that's quite confusing and reflects several misunderstandings. 
But this question itself is not about HTML5 at all. XHTML existed before 
HTML5, and within the HTML5 way of thinking, XHTML is just an 
alternative linearization, to be used if you just prefer it, or if you 
need to have your HTML5 document processed using tools that require the 
content to conform to XML rules.

Yucca, http://www.cs.tut.fi/~jkorpela/

More information about the Help mailing list