Tutorials References Exercises Bootcamps Videos Menu
Sign Up Create Website Get Certified Upgrade

HTML contenteditable Attribute


An editable paragraph:

<p contenteditable="true">This is an editable paragraph.</p>
Try it Yourself »

Definition and Usage

The contenteditable attribute specifies whether the content of an element is editable or not.

Note: When the contenteditable attribute is not set on an element, the element will inherit it from its parent.

Browser Support

The numbers in the table specify the first browser version that fully supports the attribute.

contenteditable 4.0 6.0 3.5 3.1 10.1


<element contenteditable="true|false">

Attribute Values

Value Description
true Specifies that the element is editable
false Specifies that the element is not editable

Related Pages

HTML Tutorial: HTML Attributes

HTML DOM Reference: HTML DOM contentEditable Property