English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The required attribute of <textarea> is a boolean attribute. The required attribute specifies that/must fill in a text area (to submit the form).
Form with a required text field:
<form action="action_page.php"> <textarea name="comment" required></textarea> <input type="submit"> </form>Test it out ‹/›
IEFirefoxOperaChromeSafari
Except for Internet Explorer and Safari, other mainstream browsers support the required attribute.
The required attribute is a boolean attribute.
The required attribute specifies that/must fill in a text area (to submit the form).
The required attribute is an HTML5 new attributes.
In XHTML, attribute shorthand is prohibited, the required attribute must be defined as <textarea required="required">.
<textarea required>HTML <textarea> tag