HTML textarea Tag

HTML <textarea> Tag: The HTML<textarea> tag specifies a multi-line text input control. A text area can hold an unlimited number of characters, and the text renders in a fixed-width font (usually Courier). And the size of a text area can be specified by the cols and rows attributes, or even better through CSS’ height and width properties.



HTML<textarea>Tag

This HTML textarea tag supports both the global and the event attributes.

Syntax: <textarea> Text </textarea>

Browser compatibility

The HTML textarea tag is supported by different types of browsers.

  • Chrome
  • Firefox
  • Opera
  • Safari
  • Internet Explorer

Example:

<!DOCTYPE html>
<html>
<body>
<textarea rows="4" cols="50">
FreshersNow.Com is one of the best job sites in India for freshers. In this website, we provide latest job updates for freshers and experienced professionals.
</textarea>
</body>
</html>

Output:

html textarea tag

Attributes that are supported by the <textarea> tag

Attribute Value Description
cols number Specifies the visible width of a text area
disabled disabled Specifies that a text area should be disabled
name text Specifies a name for a text area
readonly readonly Specifies that a text area should be read-only
rows number Specifies the visible number of lines in a text area