HTML contenteditable Global Attribute

Description

The global attribute contenteditable determines whether the user can edit the content of the element or not.

Syntax

<element contenteditable = "true | false">

Values

  • trueIndicates that the item can be edited.
  • falseIndicates that the item cannot be edited.

Example

<p contenteditable="true">contentedible = true, try editing me.</p>
<p contenteditable="false">contentedible = false, try editing me (it will not work!).</p>

Browser Support

Desktop
Explorer Edge Chrome Firefox Opera Safari
5.5YesYes39Yes
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung
YesYes4YesYes?