Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML | contenteditable Attribute

  • Difficulty Level : Basic
  • Last Updated : 10 Aug, 2021

It is used to specify whether the content present in the element is editable or not. When this attribute is not set in an element, this element will inherit from its parent element.
Supported Tags: It supports all HTML elements. 


Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

<element contenteditable = "true|false">

Attribute: It is mainly an instance of a Global Attributes and it can be used in any HTML elements. This attribute contains two value either true or false. If the attribute value is true then the content is editable and if the attribute value is false the content is not editable.


<!DOCTYPE html>
        <title>contenteditable attribute</title>
            body {
            h1 {
        <h2>contenteditable attribute</h2>
        <p contenteditable="true">GeeksforGeeks:
         A computer science portal for geeks</p>


Supported Browsers: The browser supported by contenteditable attribute are listed below: 

  • Google Chrome 4.0
  • Internet Explorer 6.0
  • Firefox 3.5
  • Opera 10.1
  • Safari 3.1


My Personal Notes arrow_drop_up
Recommended Articles
Page :