Jens Oliver Meiert

The Most Minimal Valid HTML Document

Published on October 2, 2023 (↻ October 12, 2023), filed under (RSS feed for all categories).

—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:

“The most minimal valid HTML document consists of just two required elements: ‘<!DOCTYPE html>’ and ‘<html></html>’.”

Figure: At least ChatGPT doesn’t say â€œtags.”

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.

Was this useful or interesting? Share this post (e.g., on Mastodon or on Bluesky), and support my work by learning with my ebooks!

About Me

Jens Oliver Meiert, on November 9, 2024.

I’m Jens (long: Jens Oliver Meiert), and I’m a web developer, manager, and author. I’ve worked as a technical lead and engineering manager for small and large enterprises, I’m an occasional contributor to web standards (like HTML, CSS, WCAG), and I write and review books for O’Reilly and Frontend Dogma.

I love trying things, not only in web development and engineering management, but also in other areas like philosophy. Here on meiert.com I share some of my experiences and views. (I value you being critical, interpreting charitably, and giving feedback.)

Why and How to Write Minimal and Valid HTML, a Link Guide

Published on November 30, 1999 (↻ March 24, 2025), filed under (RSS feed for all categories).

If you’re interested in writing HTML that is as compact as possible for an as small payload as possible, and in writing HTML that is error-free and conforms to the HTML standard, then this is a link guide for you. Specializing in minimal and valid HTML, it refers to some of my writings about these subjects.

Why Minimal HTML

How to Write Minimal HTML

Why Valid HTML

How to Write Valid HTML

(You can find more articles about minimalism and conformance on Frontend Dogma.)

What Else to Consider for HTML Optimization

As with other articles, I’m likely to update and extend this one. If you have feedback or suggestions, please let me know!

Was this useful or interesting? Share this post (e.g., on Mastodon or on Bluesky), and support my work by learning with my ebooks!

About Me

Jens Oliver Meiert, on November 9, 2024.

I’m Jens (long: Jens Oliver Meiert), and I’m a web developer, manager, and author. I’ve worked as a technical lead and engineering manager for small and large enterprises, I’m an occasional contributor to web standards (like HTML, CSS, WCAG), and I write and review books for O’Reilly and Frontend Dogma.

I love trying things, not only in web development and engineering management, but also in other areas like philosophy. Here on meiert.com I share some of my experiences and views. (I value you being critical, interpreting charitably, and giving feedback.)