Skip to content

Instantly share code, notes, and snippets.

@lindsayevans
Created November 16, 2009 20:59
Show Gist options
  • Save lindsayevans/236309 to your computer and use it in GitHub Desktop.
Save lindsayevans/236309 to your computer and use it in GitHub Desktop.
<!DOCTYPE html >
<html lang="en-au">
<head>
<title>HTML5 Shiv Test</title>
<!-- Which is worse? Inlined script or extra HTTP request? Only the llama knows. -->
<!--[if lte IE 8]><script type="text/javascript">var e=['abbr','article','aside','audio','canvas','details','figcaption','figure','footer','header','hgroup','mark','menu','meter','nav','output','progress','section','summary','time','video'],i=21,d=document;while(i--)d.createElement(e[i])</script><![endif]-->
<style type="text/css">
section { display: block; padding: 0 1em; border: 3px solid #0c0; background: #cfc; color: #0a0; }
</style>
</head>
<body>
<h1>HTML5 Shiv Test</h1>
<section>
<p>This is my HTML5 shiv, there are many like it, but this one is mine.</p>
</section>
</body>
</html>
/*@cc_on var e=['abbr','article','aside','audio','canvas','details','figcaption','figure','footer','header','hgroup','mark','menu','meter','nav','output','progress','section','summary','time','video'],i=21,d=document;while(i--)d.createElement(e[i])@*/
<!DOCTYPE html >
<html lang="en-au">
<head>
<title>HTML5 Shiv Test</title>
<!--[if lte IE 8]><script src="html5-shiv.js" type="text/javascript"></script><![endif]-->
<style type="text/css">
section { display: block; padding: 0 1em; border: 3px solid #0c0; background: #cfc; color: #0a0; }
</style>
</head>
<body>
<h1>HTML5 Shiv Test</h1>
<section>
<p>This is my HTML5 shiv, there are many like it, but this one is mine.</p>
</section>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment