HTML Element <textarea> Example

The HTML element <textarea> is used to define a multi-line text input control, which can hold an unlimited number of characters.

It is commonly used to accept input from users that extends to multiple lines, like comments, feedback, reviews, etc.,

The text within this element is rendered by browsers in a mon-spaced or fixed-width font, usually Courier font.

Here is an example that explains the element in action. Click the below link to see the live demo.

Run this on IDE

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Example - HTML Element textarea</title>
</head>
<body>
    <h2>HTML Textarea</h2>
    <form>
        <p>Please leave your comments here:<br>
            <textarea cols="50" rows="5">write something here....</textarea>
        </p>
    </form>
</body>
</html>

Related Links