2 ms·
Just to take a ridiculous idea seriously, because it’s fun⸺ The minimal “valid” HTML page is actually this: <!DOCTYPE html> … though it’s only valid in con
by chrismorgan 4y ago
Just to take a ridiculous idea seriously, because it’s fun⸺
The minimal “valid” HTML page is actually this:
<!DOCTYPE html>
… though it’s only valid in contexts that don’t require an in-document title, such as email text/html parts (the Subject header from the MIME message is used) or frames (no title is needed); for a top-level page in a web browser, to be “valid” it needs a non-empty title, such as
<!DOCTYPE html><title>x</title>
In both of these, the <html> open and close tag are omitted, as they’re both optional in HTML syntax.
If you’re not caring about validity or quirks mode, then you might as well just serve a zero-byte text/html body.
As for XML syntax which you seem to have tried to use, <html/> wouldn’t be a valid HTML document because you haven’t used the http://www.w3.org/1999/xhtml http://www.w3.org/1999/xhtml namespace.
- marginalia_nu 4y agoEh, my example renders perfectly well in every browser.
- xigoi 4y agoSo does a completely empty file.