Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML textarea required attribute

HTML

 

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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


Definition and Usage

The required attribute is a boolean attribute.

The required attribute specifies that a text area is required/must be filled in (to submit the form).


Differences between HTML 4.01 and HTML5

The required attribute is new in HTML5.


Differences between HTML and XHTML

In XHTML, attribute minimization is forbidden, and the required attribute must be defined as


Syntax


HTML textarea Tag Reference HTML