The Most Minimal Valid HTML Document
Published on Oct 2, 2023, filed under development, html, minimalism, conformance. (Share this post, e.g., on Mastodon.)
This is one of 180 articles that you can also read in an ebook: On Web Development II.
—is still this:
<!DOCTYPE html><title>␣</title>(“␣” is a placeholder, as the title element can’t be empty. The code represents the valid/required-only HTML writing style, leaving out everything that can be left out.)
Why “still”?
Because we’ve covered this many years ago, in 2008 (2014 gist, 2020 pen), though back then it was more about demonstrating universality and maximum reusability (contrasting heavily with templates like HTML5 Boilerplate) than promoting conformant minimalism.
Why repeat “this”?
Because of ChatGPT, which can’t yet optimize HTML:
Anyone checking their HTML on conformance—validating—would find the problems with the ChatGPT output and be able to deduce this most minimal document. But commercially, unfortunately, the data says that modern web development teams don’t focus on conformance *.
That’s why “this” seems worth repeating even more.
* Should they? For professionals, I absolutely think so.
About Me
I’m Jens (long: Jens Oliver Meiert), and I’m an engineering lead, guerrilla philosopher, and indie publisher. I’ve worked as a technical lead and manager at various companies (e.g., Google); I’m an active web and tool developer (code optimization, digital defense), a contributor to web standards (like HTML, CSS, WCAG), and a book author (O’Reilly, Frontend Dogma). Stay in touch.
