Tutorials References Exercises Menu
Paid Courses

HTML <textarea> required Attribute

❮ HTML <textarea> tag


A form with a required text area:

<form action="/action_page.php">
  <textarea name="comment" required></textarea>
  <input type="submit">
Try it Yourself »

Definition and Usage

The required attribute is a boolean attribute.

When present, it specifies that a text area is required/must be filled out (in order to submit the form).

Browser Support

The numbers in the table specify the first browser version that fully supports the attribute.

required Yes 10.0 4.0 Yes Yes


<textarea required>

❮ HTML <textarea> tag