HTML inert eigenschap
- Previous page id
- Next page inputmode
- Go back one level HTML Global Attributes
definitie en gebruik
inert
The attribute disables an element and all its internal elements.
These elements are still visible, but they have no function: 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 back one level HTML Global Attributes