MDN’s new design is in Beta! A sneak peek:

Element.contentEditable Redirect 1

« Element

The HTMLElement.contentEditable property is used to indicate whether or not the element is editable. This enumerated attribute can have the following values:

  • true, or the empty string, indicates that the element is editable.
  • false indicates that the element cannot be edited.
  • inherit indicates that the element inherits its parent's editable status.


editable = element.contentEditable
element.contentEditable = "true"


You can use the HTMLElement.isContentEditable property to test the computed Boolean value of this property.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 11 3.0 (1.9) 6 10.6 3.2
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support 3 1.0 (1.9) 6 Not supported 5


Document Tags and Contributors

 Last updated by: Sheppy,