Skip to content

Instantly share code, notes, and snippets.

@nathansmith
Created December 7, 2011 01:41
Show Gist options
  • Save nathansmith/1441022 to your computer and use it in GitHub Desktop.
Save nathansmith/1441022 to your computer and use it in GitHub Desktop.
Simple HTML5 Template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge, chrome=1" />
<title>untitled</title>
<link rel="stylesheet" href="" />
</head>
<body>
<script src=""></script>
</body>
</html>
@nathansmith
Copy link
Author

@adamstac — Agreed. Serve is awesome.

But, it's overkill if I just want to have a valid HTML document to test something real quick. Chrome seems to not just like HTML snippets without at least an html tag around 'em.

For instance, a few days ago, I was verifying a Formalize (http://formalize.me) bug reported in WebKit, so I put this in my minimal HTML template, tested it on the desktop, and then deleted it...

<!--
  Other browsers only see size="2" and
  higher, so they treat this as a single
  select drop-down, but WebKit always
  responds to size="..." attribute.
-->

<select>
  <option>...</option>
  <option>...</option>
</select>

<select size="0">
  <option>...</option>
  <option>...</option>
</select>

<select size="1">
  <option>...</option>
  <option>...</option>
</select>

In instances like that, setting up Serve would've been more effort than it's worth. So, that's why I keep a handy flat-file template at arm's length.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment