The 29 Boolean Attributes of HTML
Published on May 19, 2020 (updated Oct 21, 2025), filed under development, html. (Share this post, e.g. on Mastodon or on Bluesky.)
Enjoying overviews like this one? Check out Rote Learning HTML & CSS, a free ebook to help memorize HTML elements and attributes, and CSS selectors and properties.
There are Boolean attributes in HTML and, unless I err somewhere, there are two dozen of them. Here’s a quick rundown of what makes for a Boolean attribute, and what Boolean attributes there are in current HTML.
What is a Boolean at all? Citing the The Web Development Glossary, a Boolean is “a data type that has one of two possible values (usually denoted true and false).”
What is a Boolean attribute? A Boolean attribute is an attribute that can only be true or false.
How does a Boolean attribute work? According to the HTML specification:
The presence of a boolean attribute on an element represents the “true” value, and the absence of the attribute represents the “false” value.
Yet note:
The values “true” and “false” are not allowed on boolean attributes. To represent a false value, the attribute has to be omitted altogether.
So, what Boolean attributes are there?
The Boolean Attributes
allowfullscreenalphaasyncautofocusautoplaycheckedcontrolsdefaultdeferdisabledformnovalidateinertismapitemscopeloopmultiplemutednomodulenovalidateopenplaysinlinereadonlyrequiredreversedselectedshadowrootclonableshadowrootcustomelementregistryshadowrootdelegatesfocusshadowrootserializable
Yes. That’s it.
Update (October 21, 2022)
The list now strictly follows the HTML specification’s attributes overview. That means it doesn’t contain Boolean attributes found on legacy and obsolete elements anymore, like truespeed.
About Me
I’m Jens (long: Jens Oliver Meiert), and I’m a web developer, manager, and author. I’ve been working as a technical lead and engineering manager for companies you’ve never heard of and companies you use every day, 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.)
