TheDeveloperBlog.com

Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

HTML Textarea

HTML Textarea tag with examples, forms, input, text, anchor, image, heading, marquee, textarea, paragraph, title, quotes, formatting, div, code etc.

<< Back to HTML

HTML Textarea

The HTML <textarea> tag is used to define a multi-line text input control.

It can hold unlimited number of characters and the texts are displayed in a fixed-width font (usually courier).

The size of the HTML textarea is defined by <cols> and <rows> attribute, or it can also be defined through CSS height and width properties.


HTML Textarea Example

<textarea rows="9" cols="70">
JavaTpoint textarea tag example with rows and columns.
</textarea>
Test it Now

Output:

JavaTpoint textarea tag example with rows and columns.

Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<textarea>YesYesYesYesYes

New HTML 5 Textarea Attributes

AttributeDescription
autofocusIt specifies that a text area should be automatically get focused when the page is loaded.
formIt specifies one or more forms the textarea belongs to.
maxlengthIt specifies the maximum number of characters allowed in the text area.
placeholderIt specifies a short hint that describes the expected value of a textarea.
requiredIt specifies that textarea must be filled out.
wrapIt specifies that how the texts in the textarea are wrapped at the time of the submission of the form.

HTML Textarea form attribute

The form attribute specifies one or more forms the text area belongs to.

<form action="updates.jsp" id="usrform">
 Name: <input type="text" name="usrname">
 <input type="submit">
</form>
<br>
<textarea rows="9" cols="70" name="comment" form="usrform">
Enter text here...</textarea>
<p>The text area above is outside the form element, but should still be a part of the form.</p>
<p><b>Note:</b> The form attribute is not supported in Internet Explorer.</p>
Test it Now

Output:

Name:

Enter text here...

The textarea element above is outside the form , but it is still the part of the form.

Note: The form attribute is not supported in Internet Explorer.


Next TopicHTML tfoot Tag




Related Links:


Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf