HTML inert Attribute


Example

Disable a section with the inert attribute:

<div inert>
  <button onclick="alert(42)">
  <input type="text">
  <a href="https://w3schools.com">W3Schools.com</a>
</div>
Try it Yourself »

Definition and Usage

The inert attribute disables an element and all the elements inside.

The elements are still visible, but they have no function: buttons and links cannot be clicked, input fields are disabled etc., and they are ignored by screen readers.


Browser Support

Attribute
inert 102 102 112 15.5 88

Syntax

<element inert>

Related Pages

HTML <input> disabled Attribute

CSS display Property


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.