<!DOCTYPE html>
<html>
<body>

<textarea id="myTextarea" rows="4" cols="50">
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 return which type of form element the text area is.</p>

<button type="button" onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
    var x = document.getElementById("myTextarea").type;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>