html5 boilerplate


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <!doctype html>
  2. <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
  3. <!--[if lt IE 7 ]> <html class="no-js ie6" lang="en"> <![endif]-->
  4. <!--[if IE 7 ]> <html class="no-js ie7" lang="en"> <![endif]-->
  5. <!--[if IE 8 ]> <html class="no-js ie8" lang="en"> <![endif]-->
  6. <!--[if (gte IE 9)|!(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
  7. <meta charset="utf-8">
  8.  
  9. <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
  10. Remove this if you use the .htaccess -->
  11. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  12.  
  13. <meta name="description" content="">
  14. <meta name="author" content="">
  15.  
  16. <!-- Mobile viewport optimized: j.mp/bplateviewport -->
  17. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  18.  
  19. <!-- Place favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->
  20. <link rel="shortcut icon" href="/favicon.ico">
  21. <link rel="apple-touch-icon" href="/apple-touch-icon.png">
  22.  
  23.  
  24. <!-- CSS: implied media="all" -->
  25. <link rel="stylesheet" href="css/style.css?v=2">
  26.  
  27. <!-- Uncomment if you are specifically targeting less enabled mobile browsers
  28. <link rel="stylesheet" media="handheld" href="css/handheld.css?v=2"> -->
  29.  
  30. <!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
  31. <script src="js/libs/modernizr-1.7.min.js"></script>
  32.  
  33. </head>
  34.  
  35.  
  36. <div id="container">
  37. <header>
  38.  
  39. </header>
  40. <div id="main" role="main">
  41.  
  42. </div>
  43. <footer>
  44.  
  45. </footer>
  46. </div> <!--! end of #container -->
  47.  
  48.  
  49. <!-- JavaScript at the bottom for fast page loading -->
  50.  
  51. <!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if necessary -->
  52. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>
  53. <script>window.jQuery || document.write('<script src="js/libs/jquery-1.5.1.min.js">x3C/script>')</script>
  54.  
  55.  
  56. <!-- scripts concatenated and minified via ant build script-->
  57. <script src="js/plugins.js"></script>
  58. <script src="js/script.js"></script>
  59. <!-- end scripts-->
  60.  
  61.  
  62. <!--[if lt IE 7 ]>
  63. <script src="js/libs/dd_belatedpng.js"></script>
  64. <script>DD_belatedPNG.fix('img, .png_bg'); // Fix any <img> or .png_bg bg-images. Also, please read goo.gl/mZiyb </script>
  65. <![endif]-->
  66.  
  67.  
  68. <!-- mathiasbynens.be/notes/async-analytics-snippet Change UA-XXXXX-X to be your site's ID -->
  69. var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];
  70. (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
  71. g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
  72. s.parentNode.insertBefore(g,s)}(document,'script'));
  73. </script>
  74.  
  75. </body>
  76. </html>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.