6 ms·
If it is a truly empty file then no, because that wouldn't validate as a valid html file. The bare minimum I believe is <HTML></HTML> ...which on its own would
by reflectiv 6y ago
If it is a truly empty file then no, because that wouldn't validate as a valid html file.
The bare minimum I believe is <HTML></HTML> ...which on its own wouldn't be a HTML quine.
- detaro 6y agoAFAIK in HTML5 you need a doctype and and a non-empty title, but the <html> etc tags are optional: <!DOCTYPE html> <title>x</title>
- chrismorgan 6y agoTitle is actually optional “if the document is an iframe srcdoc document or if title information is available from a higher-level protocol” (such as email). So the minimal valid HTML document is actually just <!doctype html>.
- TazeTSchnitzel 6y agoBut you don't even need that if you're happy with quirks mode, right?
- sergeykish 6y agoRight data:text/html,
- peeters 6y agoSure it is, just serve it with Content-Type: 'plain/text'.
- robotresearcher 6y agoDeclaring that it’s not an HTML file is a weird way to claim the smallest valid HTML file.
- T-hawk 6y agoThat has nothing to do with HTML. That's an HTTP header. This thread has a surprising amount of not knowing the difference between HTML and HTTP. The original post is entirely about HTML and does not involve HTTP transmission at all. HTML <meta> tags are a thing, to invoke browser behavior typically associated with HTTP headers. I'm not sure if that can get you there; I would guess that to visually output the meta tag would require the same * { display:block } shenanigan that the original post is about.
- deleted 6y ago[deleted]