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


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.