Snippets: HTML5 Template & CSS Reset
If you haven't started using HTML5 for markup in your projects, now is always a good time to start. There are tons of good tutorials and posts out there that will teach you all about the new spec.
I just wanted to share a simple HTML5 template and CSS reset I use to start out each new project in hopes someone would find it useful. It contains the basic layout formula, stylesheets, latest version of jQuery, Remy Sharp's html5shim and Google Analytics code.
You can also grab the snippets and others from my Snipplr page here.
HTML5 Starting Point Template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="description" content="A description about your site" />
<meta name="keywords" content="keywords, separated, by, comma" />
<title>Untitled Document</title>
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" href="css/style.css" media="screen" />
<link rel="stylesheet" href="css/print.css" media="print" />
<link rel="stylesheet" href="css/mobile.css" media="handheld" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<!--[if IE]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<section id="header">
<header>
<h1><a href="#">Site Title</a></h1>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</header>
</section>
<section id="main">
<article>
<hgroup>
<a href="#">
<h1>Heading Title</h1>
<h2>Heading Title 2</h2>
</a>
</hgroup>
<p>Article Filler</p>
</article>
<aside>
Sidebar Filler
</aside>
</section>
<section id="footer">
<footer>
© Copyright Year by Author. All Rights Reserved.
</footer>
</section>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'XX-XXXXXXX-XX']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
CSS Reset
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent;font-weight:normal;}ol,ul,nav ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outline:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary{display:block;}input,select{vertical-align:middle;}abbr[title],dfn[title]{border-bottom:1px dotted #000;cursor:help;}hr{display:block;height:1px;border:0;border-top:1px solid #cccccc;margin:1em 0;
padding:0;}input[type='submit'],input[type='button'],input[type='text'],input[type='tel'],input[type='email'],input[type='url']{font:inherit;}button::-moz-focus-inner,input::-moz-focus-inner{border:0;}

-
http://www.ao6-labs.eu AoSiX
-
http://twitter.com/cointilt Will Ayers
-
http://www.vagrantradio.com VagrantRadio
-
http://twitter.com/cointilt Will Ayers
-
http://www.vagrantradio.com VagrantRadio













