HTML <textarea> required attribute
Definition and Usage
required
The attribute is a boolean attribute.
If this attribute is set, it specifies that the text area (textarea) is required (to successfully submit the form).
Example
Form with required text field:
<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 |