Interview Question

What is contenteditable?

Contenteditable makes page content editable.

💡 Concept ✅ Quick Revision 🌐 HTML

Answer

The `contenteditable` attribute allows the user to edit an element’s text in the page. • It is written inside an element’s opening tag. • The HTML Standard limits which elements may use it and which values are valid. • Browsers apply the attribute when they process the element or the resource it controls.

💡 Simple Example

<p contenteditable="true">Edit me</p>

⚡ Quick Revision

Contenteditable makes page content editable.