Skip to content

Instantly share code, notes, and snippets.

@ricardozea
Last active December 17, 2015 01:17
Show Gist options
  • Save ricardozea/4155401 to your computer and use it in GitHub Desktop.
Save ricardozea/4155401 to your computer and use it in GitHub Desktop.
Sublime Text 2 Snippet: HTML5 (Advanced)
<snippet>
<content><![CDATA[
<!DOCTYPE html>
<!--[if IE 8]> <html class="no-js ie8" lang="en"> <![endif]-->
<!--[if IE 9]> <html class="no-js ie9" lang="en"> <![endif]-->
<!--[if gt IE 9]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>${1:title}</title>
<meta name="description" content="${2:description}">
<meta name="author" content="${3:author}">
<meta http-equiv="cleartype" content="on">
<link rel="stylesheet" href="css/${4:cssFileName}.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/jquery-2.1.4.min.js"><\/script>')</script>
<script src="js/custom-scripts.js"></script>
<!--<link rel="shortcut icon" href="favicon.ico">-->
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<main class="main-container">
${5:content}
</main>
<script>
var _gaq=[["_setAccount","UA-XXXXX-X"],["_trackPageview"]];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
g.src=("https:"==location.protocol?"//ssl":"//www")+".google-analytics.com/ga.js";
s.parentNode.insertBefore(g,s)}(document,"script"));
</script>
</body>
</html>
]]></content>
<tabTrigger>html5</tabTrigger>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment