Boolean Attributes
Webflow's Custom Element appears to automatically recognize and handle boolean attributes. These can be bound to a data source. Any non-NULL value will render the value-less attribute, and NULL values will suppress it.
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.
This determination does not appear to be smart about the tag used, e.g. disabled
will be recognized and handled as a boolean attribute even on HTML tags that do not support disabled
as a boolean attribute.
Full List of Boolean Attributes in HTML
Haven't tested any except required
and checked
.
But here is a cGPT list;
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