English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Referenzhandbuch

Vollständiges HTML-Tag-Verzeichnis

HTML: Das <textarea> Attribut required

Das <textarea> Attribut required ist ein boolesches Attribut. Das Attribut required/You must fill in a text area (to submit the form).

 HTML <textarea> Tag

Online-Beispiel

Ein Formular mit obligatorischen Textfeldern:

<form action="action_page.php">
  <textarea name="comment" required></textarea>
  <input type="submit">
</form>
Test it out ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All mainstream browsers except Internet Explorer and Safari support the required attribute.

Definition and Usage

The required attribute is a boolean attribute.

The required attribute specifies that/You must fill in a text area (to submit the form).

HTML 4.01 with HTML5differences

The required attribute is an HTML5 new attributes.

Differences between HTML and XHTML

In XHTML, attribute abbreviations are prohibited, the required attribute must be defined as <textarea required="required">.

Syntax

<textarea required>
 HTML <textarea> Tag