Skip to content

Instantly share code, notes, and snippets.

@nikolai-shabalin
Created July 10, 2023 12:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nikolai-shabalin/2c0b290d61934ddab43c36de803df1b1 to your computer and use it in GitHub Desktop.
Save nikolai-shabalin/2c0b290d61934ddab43c36de803df1b1 to your computer and use it in GitHub Desktop.
List of all boolean attributes in html 5

Last updated: 10.07.2023

What is a boolean attribute?

From the spec

A number of attributes are boolean attributes. The presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value. If the attribute is present, its value must either be the empty string or a value that is an ASCII case-insensitive match for the attribute's canonical name, with no leading or trailing whitespace.

The values "true" and "false" are not allowed on boolean attributes. To represent a false value, the attribute has to be omitted altogether.

List

All atributes - https://html.spec.whatwg.org/#attributes-3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment