Horje
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.


Browser Support

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

Syntax

<element contenteditable="true|false">

Attribute Values

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

How to add An editable paragraph

This is a paragraph. It is editable. Try to change this text.
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<p contenteditable="true">This is a paragraph. It is editable. Try to change this text.</p>

</body>
</html>

Output should be:

How to add An editable paragraph




html contenteditable attribute

Type:
Develop
Category:
Web Tutorial
Sub Category:
HTML Global Attributes
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference