Tutorials References Exercises Videos Menu
Create Website Get Certified Upgrade

HTML contenteditable Attribute


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.


Applies to

The contenteditable attribute is a Global Attribute, and can be used on any HTML element.

Element Attribute
All HTML elements contenteditable

Example

Example

An editable paragraph:

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

Browser Support

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

Attribute
contenteditable 4.0 6.0 3.5 3.1 10.1