HTML <textarea> autofocus Attribute Last Updated : 04 Jul, 2023 Comments Improve Suggest changes Like Article Like Report The HTML <textarea> autofocus Attribute is used to specify that the textarea field should get automatically focus when the page loads. It is a Boolean Attribute. Syntax: <textarea autofocus> Example: This Example illustrates the use of autofocus attribute in Textarea Element. html <!DOCTYPE html> <html> <head> <title> HTML textarea autofocus Attribute </title> </head> <body style="text-align:center"> <h1 style="color: green;"> GeeksforGeeks </h1> <h2> HTML Textarea autofocus Attribute </h2> <textarea id="geeks" autofocus> write something here---- </textarea> </body> </html> Output: HTML textarea autofocus Supported Browsers: Google ChromeInternet ExplorerFirefoxOperaSafari Comment More infoAdvertise with us Next Article HTML | <textarea> cols Attribute M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML HTML-Attributes Similar Reads HTML <textarea> autocomplete Attribute The HTML <textarea> autocomplete Attribute is used to specify whether the Textarea field has autocomplete on or off. When the autocomplete attribute is set to on, the browser will automatically complete the values based on which the user entered before. It works with many input fields such as 1 min read HTML <textarea> autofocus Attribute The HTML <textarea> autofocus Attribute is used to specify that the textarea field should get automatically focus when the page loads. It is a Boolean Attribute. Syntax: <textarea autofocus> Example: This Example illustrates the use of autofocus attribute in Textarea Element. html <!D 1 min read HTML | <textarea> cols Attribute The HTML <textarea> cols Attribute is used to tell the browser how many average-width characters should fit on a single line i.e the number of columns to display. It is used to specify the visible width of the <Textarea> Element. Syntax: <textarea cols="number"> Attribute Values: I 1 min read HTML | <textarea> dirname Attribute The HTML <textarea> dirname Attribute is used to enable the text direction of the Textarea Field after submitting the form. The value of the dirname attribute must be the name of the input field and textarea, followed by â.dirâ. Syntax: <textarea name="myname" dirname="myname.dir"></t 1 min read HTML <textarea> disabled Attribute The disabled attribute for <textarea> element in HTML is used to specify that the text area element is disabled. A disabled text area is un-clickable and unusable. It is a boolean attribute. Syntax: <textarea disabled>text content...</textarea> Example: html <!DOCTYPE html> 1 min read HTML | <textarea> form Attribute The HTML <textarea> form Attribute is used to specify the one or more forms that the <Textarea> element belongs to.Syntax: <Textarea form="form_id"> Attribute Values: form_id: It Contains the value i.e form_id which specify the one or more form that the Textarea element belongs to. 1 min read HTML <textarea> maxlength attribute The HTML <textarea> maxlength attribute is used to specify the maximum number of characters entered into the textarea element. Syntax: <textarea maxlength ="number">Attribute Value: Attribute Value Description number It contains a single value number which allows the maximum number of ch 2 min read HTML | <Textarea> minlength Attribute The HTML <Textarea> minlength Attribute is used to define the minimum number of characters (as UTF-16 code units) of a Textarea Element. The Integer value must start with 0 or higher. Syntax: <Textarea minlength="numeric"> Attribute Value: number: It contains the numeric value i.e 0 or h 1 min read HTML <textarea> name Attribute The name attribute for the <textarea> element is essential for several reasons:Form Data Submission: The name attribute specifies the name of the <textarea> control, which becomes the key in the key-value pair data submitted with the form.Server-side Processing: On the server, this key i 2 min read HTML | <textarea> placeholder Attribute The <textarea> placeholder attribute in HTML is used to specify the expected value to be displayed before user input in textarea element. Syntax: <textarea placeholder="text"> Attribute Value: This attribute contains single value text which is the initial string to be displayed before us 2 min read Like