How to Make a DIV Element Editable in HTML
In this tutorial we are going to see How to Make a DIV Element Editable in HTML. You can set the contenteditable attribute in HTML5 to “true” to make an element editable in HTML, such as the <div> or <p> element.
Source Code:
<!DOCTYPE html> <html> <body> <h1 contentEditable="true">Title</h1> <div contentEditable="true">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Torontomi ac saga dofinoos, venenatis cabiayl ut, efficitur felis.</div> </body> </html>
Result |
---|
TitleLorem ipsum dolor sit amet, consectetur adipiscing elit. Torontomi ac saga dofinoos, venenatis cabiayl ut, efficitur felis. |