Class on HTML tag

Pick your own:

A swimming cat fetches a stick.

You can do whatever you like.

"With the use of CSS classes you can have more than one style per HTML..." - clever, innit?

Question

Recently a curious product manager sent sent over a chunk of code and asked: "Is it HTML5?"

<!DOCTYPE html>
<html class="layout-poster js no-flexbox canvas canvastext webgl no-touch geolocation postmessage no-websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients no-cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths firefox firefox18 windows wf-active" style="">

Answer

Well-paid engineers had got nothing prudent to do during their looooong boooooring days. So they begun apply styles to web pages by another cool way. Despite it works and doesn't collapse the planet Earth, this is not a W3C valid code though.

More about a class attribute in the HTML5 tag

When we find a bunch of classes in the HTML tag, what does it mean, is it HTML5? Yes, this is a sign of HTML5 mentality...

The original idea behind putting classes in a HTML tag was for user-built custom stylesheets in content management frameworks like Wordpress.

HTML class Attribute - In HTML5, the class attribute can be used on any HTML element, it will validate on any HTML element. However, it is not necessarily useful.

Jonas Persson says - I’m a fan of body.isloading { cursor: progress; }


2013.

Web development - delivering high profile business critical digital strategy deployment projects.