Css classes for html root element?

I found this code through Google Developer Tools:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" class=" js canvas canvastext geolocation crosswindowmessaging websqldatabase no-indexeddb hashchange historymanagement draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms no-csstransforms3d csstransitions video audio localstorage sessionstorage webworkers applicationcache svg smil svgclippaths no-opera no-mozilla webkit fontface"> </html> 

and this code through the html source code:

 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> </html> 

obviously these classes are generated using Javascript. But why? Why are there so many css classes for the html root element?

+6
source share
1 answer

They are generated by Modernizr to determine which features are available for a custom browser.

+14
source

Source: https://habr.com/ru/post/889023/


All Articles