Boolean Attributes List Lookup
Looks up current standard HTML boolean attribute names, independent of their element applicability. Enumerated hidden, draggable and contenteditable are excluded.
Description
Boolean HTML attributes express true by presence and false by absence.
Boolean HTML attributes express true by presence and false by absence. Attributes such as hidden, draggable and contenteditable instead have enumerated states and belong to a different category.1
The tool returns isBoolean, booleanCount. The fields describe the supplied local pattern or effective state, or contain the formatted markup shown below.
When to use Boolean Attributes List Lookup
Use this for the following task: Looks up current standard HTML boolean attribute names, independent of their element applicability. Enumerated hidden, draggable and contenteditable are excluded. Provide the requested local fields extracted from the relevant element or attribute.
How to use Boolean Attributes List Lookup and understand its results
- Prepare the parsed element names, attribute values or direct element-child lists requested below. Keep attribute presence separate from its value.
- Enter names according to the field table, then run the tool.
- Read isBoolean, booleanCount. Check the effective state, recognized-token flags or generated markup against the rules below.
- Correct any reported local mismatch and check the resulting markup in its intended document and browser context.
| Input field | Meaning | Value type and bounds | Requirement |
|---|---|---|---|
| names | Names | list of string; minimum entries 0; maximum entries 10000; each entry: maximum text length 10000 | Required |
Supply parsed attribute names. Return one membership flag per name and count matches against the stored standard vocabulary.
isBoolean = ASCII-case-folded name belongs to the stored Boolean-attribute set The symbols and boundary conditions refer to the supplied fields and the implementation described above.
| Output field | Meaning | Value type |
|---|---|---|
| isBoolean | Is Boolean | list of boolean |
| booleanCount | Boolean Count | integer |
{
"input": {
"names": [
"disabled",
"hidden",
"READONLY",
"draggable"
]
},
"output": {
"isBoolean": [
true,
false,
true,
false
],
"booleanCount": 2
}
} Limitations and assumptions
Element applicability and actual attribute values are not checked. The tool classifies names rather than interpreting strings such as disabled="false".
The tool does not fetch a page, run a browser or validate an entire HTML document. Malformed tool requests produce input errors; valid requests can still report unrecognized values or failed local checks.
Alternative or Complementary methods
Choose Global Attributes List Lookup when you need its operation: Looks up named HTML global attributes including DOM class, id and slot. Separately identifies data-* and aria-* families without validating individual family names or event handlers. Choose contenteditable Inheritance Behavior for the complementary operation: Resolves contenteditable attribute state and whether ordinary element contents are editable using a caller-supplied inherited editable flag. Empty means true and invalid/omitted values inherit. DesignMode, rich-formatting inheritance and unrelated inertness are separate.
Background reference: HTML Standard: Boolean Attributes List Lookup.
References
Similar or alternative tools
- Global Attributes List Lookup
Looks up named HTML global attributes including DOM class, id and slot. Separately identifies data-* and aria-* families without validating individual family names or event handlers.
- contenteditable Inheritance Behavior
Resolves contenteditable attribute state and whether ordinary element contents are editable using a caller-supplied inherited editable flag. Empty means true and invalid/omitted values inherit. DesignMode, rich-formatting inheritance and unrelated inertness are separate.