Boolean Attributes

ere’s a comprehensive list of all standard boolean attributes in HTML. These attributes are true when present, regardless of value, and false when absent.

Notes:

  • Boolean attributes do not require a value.

  • Setting them to "false" does not turn them off — omit the attribute instead.

Full List of Boolean Attributes in HTML

Haven't tested any except required and checked.

But here is a cGPT list;

Attribute
Applies To
Effect When Present

allowfullscreen

<iframe>

Allows fullscreen rendering

async

<script>

Executes script asynchronously

autofocus

<input>, <textarea>, <select>

Sets focus on page load

autoplay

<audio>, <video>

Starts playback automatically

checked

`<input type="checkbox

radio">`

controls

<audio>, <video>

Displays playback controls

default

<track>, <optgroup>, <option>

Marks as default selection

defer

<script>

Defers execution until HTML parsing completes

disabled

Form elements

Disables input or control

formnovalidate

<button>, <input type="submit">

Prevents form validation on submit

hidden

All elements

Hides the element from view/rendering

inert

All elements (experimental)

Makes the element and its children non-interactive

ismap

<img>

Makes image a server-side image map

itemscope

Any element

Declares microdata item

loop

<audio>, <video>

Repeats playback automatically

multiple

<select>, <input type="file">

Allows multiple selections

muted

<audio>, <video>

Mutes media

nomodule

<script>

Prevents execution in module-supporting browsers

novalidate

<form>

Disables form validation

open

<details>

Expands the disclosure widget

playsinline

<video>

Plays video inline instead of fullscreen

readonly

<input>, <textarea>

Prevents user editing, but allows focus

required

<input>, <select>, <textarea>

Makes field required for form submission

reversed

<ol>

Reverses the list order

selected

<option>

Pre-selects the option

tristate

Custom use, not standard

Sometimes used in ARIA contexts (not native)

translate

All elements

Indicates if content should be translated (yes/no)

typemustmatch

<object>

Requires correct MIME type


⚠️ Notes:

  • Boolean attributes do not require a value.

  • Setting them to "false" does not turn them off — omit the attribute instead.

Last updated