Re:This page is a truly naked, brutalist HTML quine
by detaro on Monday October 19, 2020 @08:29AM
(#24825704)
AFAIK in HTML5 you need a doctype and and a non-empty title, but the <html> etc tags are optional:
<!DOCTYPE html>
<title>x</title>
Re:This page is a truly naked, brutalist HTML quine
by chrismorgan on Monday October 19, 2020 @08:56AM
(#24825869)
Title 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>.
Re:This page is a truly naked, brutalist HTML quine
by TazeTSchnitzel on Monday October 19, 2020 @11:34AM
(#24827283)
But you don't even need that if you're happy with quirks mode, right?
Re:This page is a truly naked, brutalist HTML quine
by sergeykish on Tuesday October 20, 2020 @08:17AM
(#24836426)
Right data:text/html,
Re:This page is a truly naked, brutalist HTML quine
by peeters on Monday October 19, 2020 @10:43AM
(#24826809)
Sure it is, just serve it with Content-Type: 'plain/text'.
Re:This page is a truly naked, brutalist HTML quine
by T-hawk on Monday October 19, 2020 @01:19PM
(#24828539)
That 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.
Re:This page is a truly naked, brutalist HTML quine
by robotresearcher on Monday October 19, 2020 @11:45AM
(#24827391)
Declaring that it’s not an HTML file is a weird way to claim the smallest valid HTML file.
The bare minimum I believe is <HTML></HTML> ...which on its own wouldn't be a HTML quine.