Where to find info about doc type html class

I have just seen this coding for html and was wondering where, why, how and if I should make use of it.


<html xmlns="http://www.w3.org/1999/xhtml" lang="en" class=" js flexbox canvas canvastext webgl no-touch geolocation svg">

Does anyone know where the class is explained?

There is nothing special about those class names apart from I believe that Modernizr JavaScript library uses that so unless you are using something strange like Modernizr they are just generic classes.

Hello xhtmlcoder,

Yes, but that doesn’t explain to mean when to use the class ='s ??? Also, why include the libraries in that area when they are normally placed under a javascript link?

You normally see this when someone is using HTML5 and thus employing shivs/polyfills to make up for the lack of browser support. It’s a bit of a mess, really, but all the rage. JavaScript checks what the browser does and doesn’t support and packs a whole bunch of classes into the HTML to effect certain functionality.

Though this premature use of HTML5 is all the rage, a lot of people around here steer clear of it, as it’s an unnecessary mess—especially if there’s nothing in HTML5 that you actually need to use.

I had a hunch that it had something to do with html5 but wasn’t sure. Good to know, thanks.