By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

HTML Textarea Tag

The textarea is used in forms, to enable input from users.

Edited: 2014-12-28 07:03

The HTML Textarea element is used together with forms to submit data to the server, sometimes it may also be used to show code examples.

The textarea element can be resized in the browser, so you may want to apply maximum and minimum width and heights.


AttributesOther AttributesCommon, I18n, Event
nameCharacter Dataname of element
rowsGET|POSTRows of textarea.
colsContentTypeColumns of textarea.
disableddisableddisables the element
tabindexNUMBERPosition in tabbing order.
accesskey{CHARACTER}Key for accessibility.
onfocusScriptThe element got the focus.
onblurScriptThe element lost the focus.
onselectScriptSome text was selected.
onchangeScriptThe elements value was changed.

HTML Textarea Example

<p><textarea cols="40" rows="5" name="textmsg"></textarea></p>