SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: where to find info about doc type html class

  1. #1
    SitePoint Addict peterb's Avatar
    Join Date
    Jun 2003
    Location
    Athens, Greece
    Posts
    262
    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
    SitePoint Award Recipient xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,258
    Mentioned
    52 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.
    };-) http://www.xhtmlcoder.com/
    Thinking Web: Voices of the Community

    > March 2013 - SitePoint forums: Spot the Error 3: Calling all Sleuths! Winner Announced!... She knows how to spot simple <code> errors but do you?

  3. #3
    SitePoint Addict peterb's Avatar
    Join Date
    Jun 2003
    Location
    Athens, Greece
    Posts
    262
    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
    SitePoint Award Recipient ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, Australia
    Posts
    20,297
    Mentioned
    225 Post(s)
    Tagged
    3 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.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Try your hand at the new JavaScript Challenge!

    If you don't like getting your feet stuck in a bog, avoid Twitter BootsTrap.

  5. #5
    SitePoint Addict peterb's Avatar
    Join Date
    Jun 2003
    Location
    Athens, Greece
    Posts
    262
    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
  •