The HTML5 textarea Tag

The HTML5 <textarea> tag is essential for HTML document because this specifies a multi-line text input control. When the HTML5 <textarea> tag is placed within the document, this can hold unlimited number of characters. Typically, the font has fixed width and usually, it uses Courier by default.

Setting the size for the HTML5 <textarea> tag is possible by using the height and width properties in CSS.

The good thing about HTML5 <textarea> tag is that the author would not have problem using it since it has support for both the Event Attributes and Global Attributes. It is also accepted by the major web browsers like Safari, Internet Explorer, Google Chrome, Opera and Firefox.

The attributes for the HTML5 <textarea> tag are the following:

Attribute

Value

Description

autofocus (New)

autofocus

It is used in activating autofocus on the text area once the page has loaded up

cols

number

It is used in setting the visible width for the text area

disabled

disabled

It is used in disabling the text area

form (New)

form_id

Determines the forms if the text area is applied to one or more forms

maxlength (New)

number

It is used in setting the limit of characters for the text area

name

text

Allows the author to provide name of the text area

placeholder (New)

text

It has to be used in providing a short hint to describe the expected value of a text area, if necessary

readonly

readonly

It is the key in making the text area a read-only

required (New)

required

It is the tool in determining that the text area is required or that it has to be filled out by the user

rows

number

It is the key in determining the visible number of lines that is found within a text area

wrap (New)

hard
soft

It is essential in determining how the text within a text area should be wrapped when submitted in a form

 

Featured pages

Overview

Learn about HTML5 architecture, design principles and patterns on HTML5 Overview Tutorial. Become …

Tags

Learn about HTML5 tags and discover a new list of HTML5 tags. Find out about HTML5 tags support by…

Welcome

 Learn HTML5 development techniques, tips and tricks on our website. Find out what is required…

Date Time Picker

HTML5 forms use date and time controls regularly. HTML5 date and time controls are used by booking …