We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE

The contenteditable global attribute is an enumerated attribute indicating if the element should be editable by the user. If so, the browser modifies its widget to allow editing. The attribute must take one of the following values:

  • true or the empty string, which indicates that the element must be editable;
  • false, which indicates that the element must not be editable.

If this attribute is not set, its default value is inherited from its parent element.

This attribute is an enumerated one and not a Boolean one. This means that the explicit usage of one of the values true, false or the empty string is mandatory and that a shorthand like <label contenteditable>Example Label</label> is not allowed. The correct usage is <label contenteditable="true">Example Label</label>.

You can set the color used to draw the text insertion caret with the CSS caret-color property.


Specification Status Comment
HTML Living Standard
The definition of 'contenteditable' in that specification.
Living Standard No change from latest snapshot, HTML 5.1
HTML 5.1
The definition of 'contenteditable' in that specification.
Recommendation Snapshot of HTML Living Standard, no change from HTML5
The definition of 'contenteditable' in that specification.
Recommendation Snapshot of  HTML Living Standard, initial definition.

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) 3.0 (1.9) (Yes) (Yes) (Yes)
Feature Android Webview Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) (Yes) 1.0 (1.9) (Yes) (Yes) (Yes)

See also

Document Tags and Contributors

 Last updated by: sideshowbarker,