Create editable content in an HTML document

Use the contenteditable attribute, to make the content of an element editable.


You can try to run the following code to learn how to implement contenteditable attribute in HTML. Keep the cursor in the editable content and you will be able to edit it.

<!DOCTYPE html>
      <p contenteditable = "true">This content is editable. Try to edit it.</p>
      <p>This is a normal content. It won't edit.</p>