Jens Oliver Meiert

The 26 Boolean Attributes of HTML

Post from May 19, 2020 (↻ August 4, 2021), filed under .

There are Boolean attributes in HTML, and there are about two dozen of them—26, to be precise, unless I err somewhere. 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

  1. allowfullscreen
  2. allowpaymentrequest
  3. async
  4. autofocus
  5. autoplay
  6. checked
  7. controls
  8. default
  9. defer
  10. disabled
  11. formnovalidate
  12. hidden
  13. ismap
  14. itemscope
  15. loop
  16. multiple
  17. muted
  18. nomodule
  19. novalidate
  20. open
  21. playsinline
  22. readonly
  23. required
  24. reversed
  25. selected
  26. truespeed

Yes. That’s it.

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: HomeArchive2020 → The 26 Boolean Attributes of HTML

Last update: August 4, 2021

Professional frontend developers produce valid HTML and CSS.