If you find this helpful, please click the Google Button to the left, if it is white, to make it turn blue or red. Thank you! (It also helps find this page again more easily.) |
The contenteditable
attribute in HTML
Make sure you understand the difference between an attribute and property and are familiar with the definitions of other HTML terms.
The contenteditable attribute is an enumerated attribute, not a boolean attribute. There are four possible ways to code the contenteditable
attribute to set the contenteditable property of an element:
- omit the
contenteditable
attribute, in which case the value of the contenteditable property will be inherited contenteditable=""
, which sets the contenteditable property to truecontenteditable="true"
, which sets the contenteditable property to truecontenteditable="false"
, which sets the contenteditable property to false
All other values are not valid.