This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Aug 1st, 2012  |  syntax: None  |  size: 0.85 KB  |  views: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. HTML How to check which browser is the html currently being viewed in?
  2. <!--[if lt IE 7]>      <html class="ie6"> <![endif]-->
  3. <!--[if IE 7]>         <html class="ie7"> <![endif]-->
  4. <!--[if IE 8]>         <html class="ie8"> <![endif]-->
  5. <!--[if gt IE 8]><!--> <html>         <!--<![endif]-->
  6.        
  7. <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
  8. <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
  9. <!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
  10. <!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
  11. <!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->
  12. <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
  13.        
  14. <!DOCTYPE html>
  15. <html>
  16. <head><title>test</title></head>
  17. <body>
  18. <script>
  19. alert(navigator.userAgent);
  20. </script>
  21. </body>
  22. </html>
clone this paste RAW Paste Data