Here, We will introduce you about the <textarea> tag in html5. This tag is used for defining the control that allows multi line text input from user. The <textarea> tag is generally used within the <form> tag. The size of the text input area is set by using attribute cols and rows.
|<textarea> Predefined text Here</textarea>|
This tag have following specific attribute are as:
|name||"string" or "empty string"||Name of the textarea used to submit the value.|
|autofocus||"autofocus" or "empty string"||The focus is given to the control automatically when page loads.|
|disabled||"disabled" or "empty string"||If present, the control is disabled and can not accept changes from user.|
|form||form name||The name of the form from which the tag is associated.|
|readonly||"readonly" or "empty string"||Specify that the control is read only and can not be edit by user.|
|maxlength||non negative number||Maximum allowed number of character in element.|
|required||"required" or "empty string"||Specifies that the text area value must be needed to form submission.|
|placeholder||"string"||Specify the help comment to user related to the textarea input.|
|rows||"number"||It specify the number of lines in textarea for showing to the user.|
|cols||"number"||It specify the number of character per line in textarea for showing to the user.|
|Specify the user to add no line break, soft is
specify the user to insert line break in such way that the no line have character greater than cols attribute.
<title>Example of textarea Tag</title>
<body>The textarea here.<br>
<textarea rows="5" cols="30">
This is the sample text area.
<input type="submit" value="submit"/>
Difference between html4.01 and html5.
The attributes like cols, rows, name are also supported by html4.1 and remaining are new in html5.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.