Skip to content

The most minimal HTML page

I’m a optimizer and efficency guy… I like to get the same result for the least spend. And for an HTML web page is no exception, so I tried the most minimal HTML51 page possible…

The most minimal HTML page

And the most minimal html page is:

  1. An empty file (0 byte) with file extension “.htm” (.html is 1 extra character to the file extension)

Without the .htm (or .html) extension the browser will not interpret as a html page

You can download here, the most barebones html file possible 😅


But in Windows a file with only the file extension can be a problem (I think you can’t create a file with only the file extension). So lets add a name to the file.

To show any content you can start typing the text you want to show… There is no need to create <html> tag or <head>

An example:

An HTML example, with <b>bold</b> text and <a href="https://spimenta.com">Link</a>

If you want to add an title to the page simply add <title> tag

<title>Test</title>An HTML example, with <b>bold</b> text and <a href="https://spimenta.com">Link</a>

I think you get the point…

If you right click and “Inspect” the page the browser automaticaly adds the missing tags

<html>
<head>
<title>Test>/title>
</head>
<body>
"An HTML example, with "
<b>bold</b>
" text and "<a href="https://spimenta.com">Link</a>
</body>
</html>

(I don’t know why the browser adds the quotation marks ” ” )

Valid HTML5

But if you want an Valid HTML5 page, you can go to Nu Html Checker

And the miminal valid HTML5 page is:

<!DOCTYPE html>
<title>a</title>

But still will throw an warning, of the a missing lang attribute on <html> tag

<!DOCTYPE html>
<html lang=''>
<title>.</title>

This code throws no errors.


Footnotes:

Footnotes

  1. HTML5 is without space