Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<textarea id="myTextarea">
At w3schools.com you will learn how to make a website. We offer free tutorials in all web development technologies.
</textarea>
<p>Click the button to change the width and height of the text area.</p>
<button type="button" onclick="myFunction()">Try it</button>
<script>
function myFunction() {
  document.getElementById("myTextarea").style.height = "100px";
  document.getElementById("myTextarea").style.width = "500px";
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_textarea_cols_rows2 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 05 Sep 2022 15:53:13 GMT -->
</html>