HTML inert attribute
- Previous Page id
- Next Page inputmode
- Go to Parent Level HTML Global Attributes
Definition and Usage
inert
The attribute disables an element and all its internal elements.
These elements are still visible, but they have no functionality: buttons and links cannot be clicked, input fields are disabled, etc., and they will be ignored by screen readers.
See Also:
HTML Reference Manual:HTML <input> disabled attribute
CSS Reference Manual:CSS display attribute
Example
Disable a section through the inert attribute:
<div inert> <button onclick="alert(42)"> <input type="text"> <a href="https://codew3c.com">codew3c.com</a> </div>
Syntax
<element inert>
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
102 | 102 | 112 | 15.5 | 88 |
- Previous Page id
- Next Page inputmode
- Go to Parent Level HTML Global Attributes