HTML contenteditableAttribute
Examples
Editable paragraph:
<p contenteditable="true">This is an editable paragraph.</p>
Try it Yourself »
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the contenteditable attribute.
Definition and Usage
The contenteditable attribute specifies whether the content of an element is editable.
Note:When the contenteditable attribute is not set on an element, the element will inherit it from its parent element.
Differences between HTML 4.01 and HTML5
The contenteditable attribute is new in HTML5.
Syntax
<element contenteditable="true|false">
Attribute Values
| Value | Description |
|---|---|
| true | Specifies that the element is editable. |
| false | Specifies that the element is not editable. |
HTML Global Attributes Other extensions