The most minimal HTML page
Este conteúdo não está disponível em sua língua ainda.
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:
- 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:
If you want to add an title to the page simply add <title> tag
I think you get the point…
If you right click and “Inspect” the page the browser automaticaly adds the missing tags
(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:
But still will throw an warning, of the a missing lang attribute on <html> tag
This code throws no errors.
Footnotes:
Footnotes
-
HTML5 is without space ↩