Skip to content

Instantly share code, notes, and snippets.

@cmalven
Last active August 3, 2025 08:39
Shortest (useful) HTML5 Document
<!-- http://www.brucelawson.co.uk/2010/a-minimal-html5-document/ -->
<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<title>blah</title>
</head>
<body>
<p>I'm the content</p>
</body>
</html>
@punund
Copy link

punund commented Sep 15, 2023

if we're talking about a minimal HTML document, it's certainly not required - but doesn't really seem like a good idea either way.

Now imagine serving files with different encodings off the same web server.
Encoding is inalienable from the document itself. You can't usefully change the encoding without changing the text.

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