HTML <textarea> required attribute
Definition and Usage
required
This is a boolean attribute.
If this attribute is set, it specifies that the text area (textarea) is required (in order to successfully submit the form).
Example
Form containing a required text area:
<form action="/action_page.php"> <textarea name="comment" required></textarea> <input type="submit"> </form>
Syntax
<textarea required>
Browser Support
The numbers in the table indicate the first browser version to fully support this attribute.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 10.0 | 4.0 | Support | Support |