Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

HTML contenteditable Attribute


Example

An editable paragraph:

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

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.

Attribute
contenteditable 4.0 6.0 3.5 3.1 10.1

Syntax

<element contenteditable="true|false">

Attribute Values

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

Related Pages

HTML Tutorial: HTML Attributes

HTML DOM Reference: HTML DOM contentEditable Property