Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h1>The Element Object</h1>
<h2>The contentEditable Property</h2>
<p id="myP">I am a paragraph. Click "Editable" to make me editable.</p>
<button onclick="myFunction()">Editable</button>
<p id="demo"></p>
<script>
function myFunction() {
  document.getElementById("myP").contentEditable = true;
  document.getElementById("demo").innerHTML = "The paragraph is now editable. Try to edit it.";
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=try_dom_body_contenteditable by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 05 Sep 2022 15:18:57 GMT -->
</html>