Jens Oliver Meiert

The 25 Boolean Attributes of HTML

Post from May 19, 2020, filed under . (Tweet this?)

There are Boolean attributes in HTML, and there are about two dozen of them—25, 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. disabled
  10. formnovalidate
  11. hidden
  12. ismap
  13. itemscope
  14. loop
  15. multiple
  16. muted
  17. nomodule
  18. novalidate
  19. open
  20. playsinline
  21. readonly
  22. required
  23. reversed
  24. selected
  25. truespeed

Yes. That’s it.

About Me

Jens Oliver Meiert, on April 29, 2020.

I’m Jens Oliver Meiert, and I’m a web developer (engineering manager) and author. 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:

Cover: CSS Optimization Basics.

Perhaps my most relevant book: CSS Optimization Basics (2018). Writing CSS is a craft. As craftspeople we strive to write high quality CSS. In CSS Optimization Basics I lay out some of the most important aspects of such CSS. Available at Amazon, Google Play Books, and Leanpub.

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

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

Found a mistake? Email me,

You are here: HomeArchive2020 → The 25 Boolean Attributes of HTML

Last update: May 19, 2020

“Work is love made visible.”