SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict peterb's Avatar
    Join Date
    Jun 2003
    Location
    Athens, Greece
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

    Code:
    <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?

  2. #2
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    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.

  3. #3
    SitePoint Addict peterb's Avatar
    Join Date
    Jun 2003
    Location
    Athens, Greece
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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?

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,321
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    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.

  5. #5
    SitePoint Addict peterb's Avatar
    Join Date
    Jun 2003
    Location
    Athens, Greece
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I had a hunch that it had something to do with html5 but wasn't sure. Good to know, thanks.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •