Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML contenteditable attribute

HTML contenteditable attribute

HTML Global Attributes HTML Global Attributes

Example

An editable paragraph:

This is an editable paragraph.

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the contenteditable attribute


Definition and Usage

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

Note: When the contenteditable attribute is not set on an element, the element inherits it from its parent.


Differences between HTML 4.01 and HTML5

The contenteditable attribute is new in HTML.


Syntax

<

element

contenteditable="true|false">

HTML Global Attributes HTML Global Attributes