Editable Content

Editable content means the content that can be edited after being loaded on the Web browser. You can make content of an HTML element as editable by using the contentEditable attribute. The syntax to use the contentEditable attribute is given as follows:

< element contentEditable= [ value ] >

In the preceding syntax, element refers to an HTML element and the contentEditable attribute can take any of the following values:

  • true: Indicates that the element is editable
  • false: Indicates that the element is not editable
  • inherit: Indicates that the element is also editable if its parent is editable

You can confirm whether an element is editable or not by using the isContentEditable attribute, which returns true if the element is editable, and false if it is not. The syntax to use the isContentEditable attribute is given as follows:

element . isContentEditable

In the preceding syntax, the element returns true if it is editable; otherwise, returns false.

Click here for demos to see how to create editable content:
demo