CSS

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

Title

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Torontomi ac saga dofinoos, venenatis cabiayl ut, efficitur felis.
mcqMCQPractice competitive and technical Multiple Choice Questions and Answers (MCQs) with simple and logical explanations to prepare for tests and interviews.Read More

Leave a Reply

Your email address will not be published. Required fields are marked *