Definition and Usage
The contenteditable attribute is a global attribute. This attribute is new in HTML5. Means, this attribute does not work in the previous versions of HTML.
It specifies whether the element content is editable or not.
It allows the user to edit the content of an element.
There are two values can be set of the contenteditable attribute.
1) true : The true value specifies that the element is editable.
2) false : The false value specifies that the element is not editable.
<p contenteditable="true">This is an editable paragraph, click to edit.</p> <p contenteditable="true">This is not editable paragraph. You can't edit it</p>
Here are a few tutorials for you to read next:
If you find this tutorial helpful, then please Subscribe to our YouTube Channel for video tutorials, and share this article on social media.