contenteditable global attribute is an enumerated attribute indicating if the element should be editable by the user. If so, the browser modifies its widget to allow editing.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
The attribute must take one of the following values:
trueor an empty string, which indicates that the element is editable.
false, which indicates that the element is not editable.
If the attribute is given without a value, like
<label contenteditable>Example Label</label>, its value is treated as an empty string.
If this attribute is missing or its value is invalid, its value is inherited from its parent element: so the element is editable if its parent is editable.
Note that although its allowed values include
false, this attribute is an enumerated one and not a Boolean one.
BCD tables only load in the browser