Jens Oliver Meiert

HTML Concepts: The “Nothing” Content Model

Post from June 17, 2021 (↻ December 17, 2021), filed under .

In this little series that started with the meaning of “body-ok,” let’s move to a trivial but little-known concept: the “nothing” content model.

What is it? It literally means what it says:

When an element’s content model is nothing, the element must contain no Text nodes (other than inter-element whitespace) and no element nodes.

If this reminds of “empty” or void elements, then because it made sense to make elements that have nothing as content, elements that require no end tag. Having a content model of “nothing” and being a void element are not identical, however, as the spec explains:

Most HTML elements whose content model is “nothing” are also, for convenience, void elements (elements that have no end tag in the HTML syntax). However, these are entirely separate concepts.

You notice “most”: Not all elements with the “nothing” content model are void elements. Best example? The template element. This is because contents of template are not children of the element itself.

Is this series interesting? Let me know in the comments (when still open) or as a response to my tweet for this post.

Tweet this? (If it changed your life, you delight me with a coffee.)

About Me

Jens Oliver Meiert, on April 29, 2020.

I’m Jens Oliver Meiert, and I’m an engineering manager and author. I’ve worked as a technical lead for Google, I’m close to the W3C and the WHATWG, and I write and review books for O’Reilly. Other than that, I love trying things, sometimes including philosophy, art, and adventure. Here on I share some of my views and experiences.

If you have questions or suggestions about what I write, please leave a comment (if available) or a message.

Read More

Have a look at the most popular posts, possibly including:

Looking for a way to comment? Comments have been disabled, unfortunately.

Cover: The Web Development Glossary.

Perhaps my most comprehensive book: The Web Development Glossary (2020). With explanations and definitions for literally thousands of terms from Web Development and related fields, building on Wikipedia as well as the MDN Web Docs. Available at Apple Books, Kobo, Google Play Books, and Leanpub.

Stay up-to-date? Follow me by feed or on Twitter.

Found a mistake? Email me,

You are here: HomeArchive2021 → HTML Concepts: The “Nothing” Content Model

Last update: December 17, 2021

Professional frontend developers produce valid HTML and CSS.