Global Attributes
contenteditable="true"
Makes an element a rich-text editing host when its parent is not editable. Users can modify its contents and may paste formatted markup; the changes do not automatically save or submit. Global enumerated attribute, not a Boolean attribute. Empty means true; missing or invalid inherits. Use a labeled textarea for ordinary form text when possible.
Formal Syntax & Structure
html syntaxhtml
contenteditable="true"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| contenteditable | keyword | Makes an element a rich-text editing host when its parent is not editable. Users can modify its contents and may paste formatted markup; the changes do not automatically save or submit. |
Working Example
Example Snippethtml
<p id="label">Editable note</p><div role="textbox" aria-labelledby="label" contenteditable="true">Edit this note.</div>