HTML contenteditable Attribute
- Previous Page class
- Next Page contextmenu
- Go to the Previous Level HTML Global Attributes
Definition and Usage
contenteditable
The attribute specifies whether the content of the element is editable.
Note: If the element is not set contenteditable
If an element does not have the attribute, it will inherit the attribute from its parent element.
See also:
HTML Tutorial:HTML attributes
HTML DOM Reference Manual:HTML DOM contentEditable attribute
Example
An editable paragraph:
<p contenteditable="true">This is an editable paragraph.</p>
Syntax
<element contenteditable="true|false">
Attribute Value
Value | Description |
---|---|
true | Specifies that the element is editable. |
false | Specifies that the element is not editable. |
Browser Support
The numbers in the table indicate the first browser version to fully support this attribute.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
4.0 | 6.0 | 3.5 | 3.1 | 10.1 |
- Previous Page class
- Next Page contextmenu
- Go to the Previous Level HTML Global Attributes