Minimum HTML5 markup for a page that validates successfully

Minimum HTML Markup that validates. The following is valid HTML5 markup and will validate.

<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
</body>
</html>

Success! "This document was successfully checked as HTML5!"

Note that you will may get the "experimental feature" warning.

See the Markup Validation Service: https://validator.w3.org/
View this page on GitHub.
Posted .

2 comments

  1. anonymous

    You can make it shorter: the <body> element isn't required in HTML5. And if your server is emitting the correct headers, the charset isn't technically required either.

  2. anonymous
    Actually, this is the minimum: <!doctype html> <html> <head> <title></title> </head> </html>

Leave a Reply