Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

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