---
title: "Discussion on \"Did you know HTML elements can be editable?\" | Hashnode"
description: "Discussion on \"Did you know HTML elements can be editable?\". This is one of the HTML options you don't see often, but are actually really cool.\nThere is an HTML attribute called contenteditable, and it allows HTML elements to become editable 🙊.\nLet me show you how it looks on this Codepen.\n(Click any text!)\nh..."
url: "https://hashnode.com/posts/did-you-know-html-elements-can-be-editable/5f44aa601b2ea309b75294cf"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Did you know HTML elements can be editable?](https://h.daily-dev-tips.com/did-you-know-html-elements-can-be-editable?utm_source=hashnode&utm_medium=feed)

This is one of the HTML options you don't see often, but are actually really cool. There is an HTML attribute called contenteditable, and it allows HTML elements to become editable 🙊. Let me show you how it looks on this Codepen. (Click any text!) h...

Aug 25, 2020 · 2 min read · h.daily-dev-tips.com  
Read the article

-   [#html](https://hashnode.com/tag/html)
-   [#html5](https://hashnode.com/tag/html5)
-   [#2articles1week](https://hashnode.com/tag/2articles1week)
-   [#developers](https://hashnode.com/tag/developers)

## Written by

[Chris Bongers](https://hashnode.com/@dailydevtips)

@dailydevtips · Cape Town, SA

  
[View profile](https://hashnode.com/@dailydevtips)

Looking to get into development? As a full-stack developer I guide you on this journey and give you bite sized tips every single day 👊

I'm a full-stack developer from South Africa 🇿🇦. I love writing about JavaScript, HTML and CSS.

## Responses 2

Markdown supported · ⌘↵ to post

[Alyssa Holland](https://hashnode.com/@AlyssaCodes)

[Aug 25, 2020](https://hashnode.com/posts/did-you-know-html-elements-can-be-editable/5f44aa601b2ea309b75294cf/comment/5f4518c5d36f0b18d47c40da)

That’s cool that you showcased this often forgotten attribute. I’m actually quite familiar with contentenditable as I worked on a project that utilized it to create a transcript editor. When you couple it with Javascript, it’s actually pretty powerful.

[Chris Bongers](https://hashnode.com/@dailydevtips)

[Aug 25, 2020](https://hashnode.com/posts/did-you-know-html-elements-can-be-editable/5f44aa601b2ea309b75294cf/comment/5f4518c5d36f0b18d47c40da#reply-5f4519b6b9870f18f59a83d2)

Oh nice to hear someone actually using it! So you used it as actual "input" to save values?

[Alyssa Holland](https://hashnode.com/@AlyssaCodes)

[Aug 25, 2020](https://hashnode.com/posts/did-you-know-html-elements-can-be-editable/5f44aa601b2ea309b75294cf/comment/5f4518c5d36f0b18d47c40da#reply-5f4527c4b9870f18f59a84c3)

Yea that’s the general gist. We used contenteditable to allow them to make revisions and extract the content with textContent. Behind the scenes we do a bunch of validation and all that good stuff. The final product ended up being fairly robust. But I am biased since I worked on it 😆

[Chris Bongers](https://hashnode.com/@dailydevtips)

[Aug 25, 2020](https://hashnode.com/posts/did-you-know-html-elements-can-be-editable/5f44aa601b2ea309b75294cf/comment/5f4518c5d36f0b18d47c40da#reply-5f4528acd36f0b18d47c41c0)

[Alyssa Holland](https://hashnode.com/@Code_Runnings) Sounds cool! Awesome work Alyssa, thanks for noting this, it's good that people see use-cases of this element

[Daniel Martorell](https://hashnode.com/@dmartorell)

[Aug 25, 2020](https://hashnode.com/posts/did-you-know-html-elements-can-be-editable/5f44aa601b2ea309b75294cf/comment/5f44daa28baa1a1089f7dd94)

Hi! Interesting article.

Sorry for my lack of knowledge but could you give me some examples in which this feature can be useful?

Thanks for sharing!

[Chris Bongers](https://hashnode.com/@dailydevtips)

[Aug 25, 2020](https://hashnode.com/posts/did-you-know-html-elements-can-be-editable/5f44aa601b2ea309b75294cf/comment/5f44daa28baa1a1089f7dd94#reply-5f44dba31dad8c106865bafc)

I personally wouldn't recommend this option for many adventures, BUT it can be useful to make something like a visual character tester!

So imagine you have an email or website and content creators are able to write content, you tell them, keep lines at 250 chars. It would be cooler if they can just see how it would actually look right. In this case contenteditable is a good option.

If they actually need a wysywg editor not, if they need to save the data, not.

It's a thin line, but there are some good use-cases for it.

[Daniel Martorell](https://hashnode.com/@dmartorell)

[Aug 25, 2020](https://hashnode.com/posts/did-you-know-html-elements-can-be-editable/5f44aa601b2ea309b75294cf/comment/5f44daa28baa1a1089f7dd94#reply-5f44dc248baa1a1089f7ddb0)

I see. It makes sense. Thanks again! [Daily Dev Tips](https://hashnode.com/@dailydevtips)
