{"id":6428,"date":"2015-08-20T12:15:12","date_gmt":"2015-08-20T09:15:12","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=6428"},"modified":"2017-12-19T13:48:03","modified_gmt":"2017-12-19T11:48:03","slug":"html5-contenteditable-attribute-example","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/","title":{"rendered":"HTML5 Contenteditable Attribute Example"},"content":{"rendered":"<p>In this example, we&#8217;ll be introducing and talking about <code>contenteditable<\/code> attribute of HTML5. The <code>contenteditable<\/code> attribute specifies whether the content of an element is editable or not.<\/p>\n<p>For some time now, we\u2019ve been using various technologies to edit and store text within a web browser. Now with the contenteditable attribute, things have got a whole lot easier.<\/p>\n<p>In this article, we&#8217;ll be looking at what this attribute is for, how it works, and how we can take things further.<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n[ulp id=&#8217;tgm4cmEWcKUikZNn&#8217;]<\/p>\n<h2>1. Initial Setup and Application<\/h2>\n<p>Go ahead and create a new html document and add the basic sytnax in it like so:<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n\t&lt;title&gt;HTML5 Contenteditable Attribute Example&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;!-- STYLE SECTION --&gt;\r\n\r\n&lt;style type=\"text\/css\"&gt;\r\n\r\n&lt;\/style&gt;\r\n\r\n&lt;!-- HTML SECTION --&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<h3>1.1 Browser Support<\/h3>\n<p>Content editable is fully compatible with current browsers:<\/p>\n<p>\u2022&nbsp;Firefox 3.5+<br \/>\n\u2022&nbsp;Firefox for Android 19+<br \/>\n\u2022&nbsp;Chrome 4.0+<br \/>\n\u2022&nbsp;Internet Explorer 5.5+ *<br \/>\n\u2022&nbsp;Safari 3.1+<br \/>\n\u2022&nbsp;Opera 9+<br \/>\n\u2022&nbsp;iOS Safari 5.0+<br \/>\n\u2022&nbsp;Android Browser 3.0+<br \/>\n\u2022&nbsp;Opera Mobile 12.1+<br \/>\n\u2022&nbsp;Chrome for Android 25+<\/p>\n<h3>1.2 Syntax &amp; Attribute Values<\/h3>\n<p>The syntax for applying the attribute in HTML is: <code>&lt;element contenteditable=\"true|false\"&gt;<\/code><\/p>\n<p>The two values this attribute can take are:<\/p>\n<p>&#8211; <strong>true<\/strong> which specifies that the element is editable.<br \/>\n&#8211; <strong>false<\/strong> which specifies that the element is not editable.<\/p>\n<p>Note that the default value of <code>contenteditable<\/code> is <code>inherit<\/code> and <code>contenteditable=\"\"<\/code> or <code>contenteditable=\"true\"<\/code> mean the same thing when being applied, they both mean <code>true<\/code>.<\/p>\n<h3>1.3 Basic Application<\/h3>\n<p>To apply the attribute in a basic form just add a new paragraph in HTML and assign it <code>contenteditable=\"true\"<\/code> like so:<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION  --&gt;\r\n&lt;p contenteditable=\"true\"&gt;This text element is editable.&lt;\/p&gt;\r\n<\/pre>\n<p>And we&#8217;d have a single line of text which can be changed to whatever text you like:<br \/>\n<figure id=\"attachment_6440\" aria-describedby=\"caption-attachment-6440\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/08\/contenteditable1.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/08\/contenteditable1.jpg\" alt=\"Basic Application of the Attribute\" width=\"820\" height=\"313\" class=\"size-full wp-image-6440\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/08\/contenteditable1.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/08\/contenteditable1-300x115.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-6440\" class=\"wp-caption-text\">Basic Application of the Attribute<\/figcaption><\/figure><\/p>\n<p>By default, your paragraph (without this attribute) will not be editable, so there is no need to apply the <code>false<\/code> value.<\/p>\n<h2>2. Futher into Contenteditable<\/h2>\n<h3>2.1 Application to a Parent Element<\/h3>\n<p>Applying <code>contenteditable<\/code> attribute into parent elements, that is, elements with several elements inside them, and setting the value to true, will give all of the children element editability. Check the example below:<\/p>\n<pre class=\"brush:xml\">\r\n&lt;div contenteditable=\"true\" class=\"parent\"&gt;\r\n    &lt;h2&gt;I am the first child.&lt;\/h2&gt;\r\n    &lt;div&gt;I am the second child&lt;\/div&gt;\r\n    &lt;p&gt;I am the third child.&lt;\/p&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>All of the element inside the <code>parent<\/code> div will be fully editable.<br \/>\n<figure id=\"attachment_6446\" aria-describedby=\"caption-attachment-6446\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/08\/contenteditable2.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/08\/contenteditable2.jpg\" alt=\"Parent Element with Contenteditable Attribute\" width=\"820\" height=\"313\" class=\"size-full wp-image-6446\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/08\/contenteditable2.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/08\/contenteditable2-300x115.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-6446\" class=\"wp-caption-text\">Parent Element with Contenteditable Attribute<\/figcaption><\/figure><\/p>\n<p>This happens for all child element whenever the attribute is applied to their respective parent elements except when a child element explicitly has the <code>contenteditable=\"false\"<\/code> applied. Let&#8217;s give an example:<\/p>\n<pre class=\"brush:xml\">\r\n&lt;div contenteditable=\"true\" class=\"parent\"&gt;\r\n    &lt;h2 contenteditable=\"false\"&gt;I am the first child and I cannot be changed.&lt;\/h2&gt;\r\n    &lt;div&gt;I am the second child&lt;\/div&gt;\r\n    &lt;p&gt;I am the third child.&lt;\/p&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>That is it. Now the first element will not be editable, while the others will.<br \/>\n<figure id=\"attachment_6451\" aria-describedby=\"caption-attachment-6451\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/08\/contenteditable3.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/08\/contenteditable3.jpg\" alt=\"Parent Attribute vs Child Attribute\" width=\"820\" height=\"313\" class=\"size-full wp-image-6451\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/08\/contenteditable3.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/08\/contenteditable3-300x115.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-6451\" class=\"wp-caption-text\">Parent Attribute vs Child Attribute<\/figcaption><\/figure><\/p>\n<h3>2.2 Saving the Changes<\/h3>\n<p>Saving changes depends on where we will store the data; commonly, it will be saved in a database. But since we do not have database access, in this tutorial, we are going to show you how to save the changes in localStorage. To do so, we will also use a bit of jQuery to make the code simpler. <\/p>\n<p>First, add a text element and then a button element in HTML. The button is going to save the changes.<\/p>\n<pre class=\"brush:xml\">\r\n&lt;article id=\"content\" contenteditable=\"true\"&gt;\r\n    &lt;p&gt;Sweet roll tiramisu chocolate bar sugar plum caramels tootsie roll caramels. Chocolate cake wypas cotton candy icing. Applicake sesame snaps liquorice pastry croissant caramels fruitcake gingerbread biscuit. Donut toffee candy canes.&lt;\/p&gt;\r\n&lt;\/article&gt;\r\n\r\n&lt;button id=\"save\"&gt;Save Changes&lt;\/button&gt;\r\n\r\n&lt;script type=\"text\/javascript\" src=\"js\/jquery-1.11.3.min.js\"&gt;&lt;\/script&gt;\r\n<\/pre>\n<p>Don&#8217;t forget to include the jQuery library on your HTML. Next, lets save the edited content using jQuery.<\/p>\n<pre class=\"brush:java\">\r\n&lt;script&gt;\r\n    var theContent = $('#content');\/\/ set the content\r\n\r\n    $('#save').on('click', function(){ \r\n   \/\/ stores the new content in localStorage when the button is clicked\r\n        var editedContent   = theContent.html();\r\n        localStorage.newContent = editedContent;\r\n    });\r\n&lt;\/script&gt;\r\n<\/pre>\n<p>This code will create a new key in localStorage containing the last change made in the content. We can use the Firebug or Developer Tools to clarify whether the data has been successfully stored or not, but make sure you hit the button. For Firefox users, go to the DOM panel and search for localStorage. In Chrome as well as Safari, we can see it under the \u2018Resources\u2019 tab.<br \/>\n<figure id=\"attachment_6454\" aria-describedby=\"caption-attachment-6454\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/08\/contenteditable4.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/08\/contenteditable4.jpg\" alt=\"Saving the Changes on Local Storage\" width=\"820\" height=\"653\" class=\"size-full wp-image-6454\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/08\/contenteditable4.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/08\/contenteditable4-300x239.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-6454\" class=\"wp-caption-text\">Saving the Changes on Local Storage<\/figcaption><\/figure><\/p>\n<p>No only can we save changes to the local storage, but we can also retrieve these changes when the page is reloaded:<\/p>\n<pre class=\"brush:java\">\r\n&lt;script&gt;\r\n    \/\/ save changes to localStorage\r\n    var theContent = $('#content');\r\n    $('#save').on('click', function(){ \r\n        var editedContent   = theContent.html();\r\n        localStorage.newContent = editedContent;\r\n    });\r\n    \/\/ retrieve the saved text\r\n    if(localStorage.getItem('newContent')) { \r\n   \/\/ applies the newContent when it is exist ini localStorage\r\n        theContent.html(localStorage.getItem('newContent'));\r\n    }\r\n&lt;\/script&gt;\r\n<\/pre>\n<p>Simple as that, we&#8217;d now have the paragraph updated even when the page gets reloaded.<br \/>\n<figure id=\"attachment_6458\" aria-describedby=\"caption-attachment-6458\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/08\/contenteditable5.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/08\/contenteditable5.jpg\" alt=\"Retrieving Saved Changes on Page Reload!\" width=\"820\" height=\"303\" class=\"size-full wp-image-6458\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/08\/contenteditable5.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/08\/contenteditable5-300x111.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-6458\" class=\"wp-caption-text\">Retrieving Saved Changes on Page Reload!<\/figcaption><\/figure><\/p>\n<h2>3. Conclusion<\/h2>\n<p>Tp conclude,  the attribute finally makes official something that\u2019s been implemented by browser makers for years. Although this is one of the lesser-known new attributes, I bet you\u2019ll find yourself using it more often than you would think. Imagine being able to simply click a block of content and start making changes instantly: making quick corrections to an article in-place, allowing users to edit their comments, or even building spreadsheets within company applications that aren\u2019t hooked up to any sort of back-end user interface. It is up to you to come up with even more uses.<\/p>\n<h2>4. Download<\/h2>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/08\/HTML5-Contenteditable-Attribute.zip\"><strong>HTML5 Contenteditable Attribute<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this example, we&#8217;ll be introducing and talking about contenteditable attribute of HTML5. The contenteditable attribute specifies whether the content of an element is editable or not. For some time now, we\u2019ve been using various technologies to edit and store text within a web browser. Now with the contenteditable attribute, things have got a whole &hellip;<\/p>\n","protected":false},"author":75,"featured_media":914,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-6428","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-html5"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>HTML5 Contenteditable Attribute Example - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"In this example, we&#039;ll be introducing and talking about contenteditable attribute of HTML5. The contenteditable attribute specifies whether the content of\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HTML5 Contenteditable Attribute Example - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"In this example, we&#039;ll be introducing and talking about contenteditable attribute of HTML5. The contenteditable attribute specifies whether the content of\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/fabiocimo\" \/>\n<meta property=\"article:published_time\" content=\"2015-08-20T09:15:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-12-19T11:48:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Fabio Cimo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fabiocimo\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fabio Cimo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/\"},\"author\":{\"name\":\"Fabio Cimo\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22\"},\"headline\":\"HTML5 Contenteditable Attribute Example\",\"datePublished\":\"2015-08-20T09:15:12+00:00\",\"dateModified\":\"2017-12-19T11:48:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/\"},\"wordCount\":749,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg\",\"articleSection\":[\"HTML5\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/\",\"name\":\"HTML5 Contenteditable Attribute Example - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg\",\"datePublished\":\"2015-08-20T09:15:12+00:00\",\"dateModified\":\"2017-12-19T11:48:03+00:00\",\"description\":\"In this example, we'll be introducing and talking about contenteditable attribute of HTML5. The contenteditable attribute specifies whether the content of\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HTML5\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/html5\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"HTML5 Contenteditable Attribute Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22\",\"name\":\"Fabio Cimo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g\",\"caption\":\"Fabio Cimo\"},\"description\":\"Fabio is a passionate student in web tehnologies including front-end (HTML\/CSS) and web design. He likes exploring as much as possible about the world wide web and how it can be more productive for us all. Currently he studies Computer Engineering, at the same time he works as a freelancer on both web programming and graphic design.\",\"sameAs\":[\"https:\/\/www.facebook.com\/fabiocimo\",\"https:\/\/al.linkedin.com\/in\/fabiocimo\",\"https:\/\/x.com\/fabiocimo\",\"https:\/\/www.youtube.com\/fabiocimo1\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/fabio-cimo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"HTML5 Contenteditable Attribute Example - Web Code Geeks - 2026","description":"In this example, we'll be introducing and talking about contenteditable attribute of HTML5. The contenteditable attribute specifies whether the content of","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/","og_locale":"en_US","og_type":"article","og_title":"HTML5 Contenteditable Attribute Example - Web Code Geeks - 2026","og_description":"In this example, we'll be introducing and talking about contenteditable attribute of HTML5. The contenteditable attribute specifies whether the content of","og_url":"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_author":"https:\/\/www.facebook.com\/fabiocimo","article_published_time":"2015-08-20T09:15:12+00:00","article_modified_time":"2017-12-19T11:48:03+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg","type":"image\/jpeg"}],"author":"Fabio Cimo","twitter_card":"summary_large_image","twitter_creator":"@fabiocimo","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Fabio Cimo","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/"},"author":{"name":"Fabio Cimo","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22"},"headline":"HTML5 Contenteditable Attribute Example","datePublished":"2015-08-20T09:15:12+00:00","dateModified":"2017-12-19T11:48:03+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/"},"wordCount":749,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg","articleSection":["HTML5"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/","url":"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/","name":"HTML5 Contenteditable Attribute Example - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg","datePublished":"2015-08-20T09:15:12+00:00","dateModified":"2017-12-19T11:48:03+00:00","description":"In this example, we'll be introducing and talking about contenteditable attribute of HTML5. The contenteditable attribute specifies whether the content of","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-contenteditable-attribute-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"HTML5","item":"https:\/\/www.webcodegeeks.com\/category\/html5\/"},{"@type":"ListItem","position":3,"name":"HTML5 Contenteditable Attribute Example"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22","name":"Fabio Cimo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g","caption":"Fabio Cimo"},"description":"Fabio is a passionate student in web tehnologies including front-end (HTML\/CSS) and web design. He likes exploring as much as possible about the world wide web and how it can be more productive for us all. Currently he studies Computer Engineering, at the same time he works as a freelancer on both web programming and graphic design.","sameAs":["https:\/\/www.facebook.com\/fabiocimo","https:\/\/al.linkedin.com\/in\/fabiocimo","https:\/\/x.com\/fabiocimo","https:\/\/www.youtube.com\/fabiocimo1"],"url":"https:\/\/www.webcodegeeks.com\/author\/fabio-cimo\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/6428","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=6428"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/6428\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/914"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=6428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=6428"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=6428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}