Search w3schools.com:

SHARE THIS PAGE

HTML contenteditable Attribute

HTML Global Attributes HTML Global Attributes

Example

An editable paragraph:

<p contenteditable="true">This is an editable paragraph.</p>

Try it yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The contenteditable attribute is supported in all major browsers.


Definition and Usage

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


Differences Between HTML 4.01 and HTML5

The contenteditable attribute is new in HTML5.


Syntax

<element contenteditable="true|false|inherit">

Attribute Values

Value Description
true Specifies that the element is editable
false Specifies that the element is not editable
inherit Specifies that the element is editable if its parent is


HTML Global Attributes HTML Global Attributes

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]