www.webdeveloper.com
Results 1 to 4 of 4

Thread: htnk code

  1. #1
    Join Date
    Feb 2011
    Posts
    90

    htnk code

    Code:
    <!--[if IE 6 ]><html class="ie ielt9 ielt8 ielt7 ie6" lang="en-US"><![endif]-->
    <!--[if IE 7 ]><html class="ie ielt9 ielt8 ie7" lang="en-US"><![endif]-->
    <!--[if IE 8 ]><html class="ie ielt9 ie8" lang="en-US"><![endif]-->
    <!--[if IE 9 ]><html class="ie ie9" lang="en-US"><![endif]-->
    <!--[if (gt IE 9)|!(IE)]><!--><html lang="en-US"><!--<![endif]-->
    I found this code in a web page.

    It is not javascript but it is also not server side because I have it in my browser.


    How exactly this code work?

    Can anyone clarify this to me?

  2. #2
    Join Date
    Aug 2006
    Posts
    1,902
    It's done in the browser, these are "IE Conditional Comments" and they're setting classes based on the version of IE in use. See http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx for documentation.

    Dave

  3. #3
    Join Date
    Feb 2011
    Posts
    90
    Quote Originally Posted by tracknut View Post
    It's done in the browser, these are "IE Conditional Comments" and they're setting classes based on the version of IE in use. See http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx for documentation.

    Dave
    thanks.

    And how other browser handle it?

    Do they have stadard for this?

  4. #4
    Join Date
    Aug 2006
    Posts
    1,902
    Nope, this is only an IE thing, largely to allow developers to tweak code for specific non-standard components of its various versions. The other browsers (and current IE browser) generally conform pretty well to the standards, so there's much less need for tweaks to those.

    Dave

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles