Categories
Web development

HTML contenteditable Attribute

HTML contenteditable Attribute

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

Syntax:

<element contenteditable="true|false"> 

true – defines that the element is editable.

false – defines that the element isn’t editable.

Example:

<!DOCTYPE html>
<html>
<body>

<h3 contenteditable="true">This is a heading. It is editable. You can change this text.</h3>

</body>
</html>

Output:

This is a heading. It is editable. You can change this text.


Enjoy coding!

Read also:

HTML Attributes

HTML Basics