HTML | DOM Textarea rows Property Last Updated : 31 Jul, 2022 Comments Improve Suggest changes Like Article Like Report The DOM Textarea rows Property is used to set or return the value of a rows attribute of a textarea field. The rows attribute specifies the number of visible text lines for the control i.e the number of rows to display. Syntax: It is used to Return the rows property:textareaObject.rowsIt is used to Set the rows property:textareaObject.rows = number Property Values: number: It specifies a visible number of rows in a textarea field. It has a default value which is 2. Return Value: It returns a numeric value that represents the height of a textarea field containing the characters. Example-1: HTML program to illustrate set the DOM Textarea rows Property. HTML <!DOCTYPE html> <html> <head> <title>DOM Textarea rows Property</title> <style> h1, h2 { text-align: center; } </style> </head> <body style="text-align:center;"> <h1 style="color: green;"> GeeksforGeeks </h1> <h2> DOM Textarea rows Property </h2> <!-- Below id assigned to Textarea Element --> <textarea id="GFG" rows="5" cols="23"> This paragraph has number of rows equal to 5. </textarea> <br> <button type="button" onclick="myGeeks()"> Submit </button> <script> function myGeeks() { // Change the number of rows in a Textarea document.getElementById("GFG").rows = "10"; } </script> </body> </html> Output: Before Clicking On Button: After Clicking On Button : Example-2: HTML program to illustrate to return the DOM Textarea rows Property. HTML <!DOCTYPE html> <html> <head> <title>DOM Textarea rows Property</title> <style> h1, h2 { text-align: center; } </style> </head> <body style="text-align:center;"> <h1 style="color: green;"> GeeksforGeeks </h1> <h2> DOM Textarea rows Property </h2> <!-- Below id assigned to Textarea Element --> <textarea id="GFG" rows="5" cols="23"> This paragraph has number of rows equal to 5. </textarea> <br> <button type="button" onclick="myGeeks()">Submit</button> <p id="sudo"></p> <script> function myGeeks() { // Return number of rows in the textare. var x = document.getElementById("GFG").rows; document.getElementById("sudo").innerHTML = "There are" + x + " rows in a Textarea height."; } </script> </body> </html> Output: Before Clicking On Button: After Clicking On Button: Supported Browsers: The browser supported by Textarea rows Property are listed below: Google Chrome 1Edge 12Internet Explorer 6Firefox 1Opera 12.1Safari 4 Comment More infoAdvertise with us Next Article HTML | DOM Style transformOrigin Property M manaschhabra2 Follow Improve Article Tags : Misc Web Technologies HTML HTML-DOM Practice Tags : Misc Similar Reads HTML | DOM Style transformOrigin Property Every HTML element has some position on the screen. This position is described using co-ordinate geometry using x-axis and y-axis. The HTML DOM Style transformOrigin Property used to change the position of an HTML div. It helps in both 2D and 3D transformation.Syntax: To set the transformOrigin prop 2 min read HTML DOM Input Search Object The Input Search object is used for representing an HTML <input> element of the type="search". The Input Search Object is new in HTML5. Syntax: For creating a <input> element with the type ="search":let input_field = document.createElement("input");input_field.setAttribute("type", "sear 2 min read HTML | DOM Style borderSpacing Property The DOM Style borderSpacing Property is used to set or return the spacing between the cells in a table. Syntax: To get the borderSpacing propertyobject.style.borderSpacingTo set the borderSpacing propertyobject.style.borderSpacing = "length | initial | inherit" Return Values: It returns a string val 3 min read HTML DOM Audio Object The Audio object is used for representing an HTML <audio> element. The Audio Object is a new object in HTML5. Syntax: For creating an <audio> element:let gfg = document.createElement("AUDIO")For accessing an <audio> element:let x = document.getElementById("myAudio") Property Values 4 min read HTML | DOM Window stop() Method The stop() method in DOM is used to stop the window from loading resources in the current browsing context, similar to the browser's stop button. Syntax: window.stop() Example: Stop window from loading. html <!DOCTYPE html> <html> <head> <title> HTML | DOM Window stop() Metho 1 min read HTML | DOM Ol reversed Property The DOM Ol reversed Property is used to set or return whether the list items are in Descending order(9, 8, 7, 6, ...) or in Ascending order(1, 2, 3, 4...). Syntax: It is used to return the reversed property.olObject.reversedIt is used to set the reversed property.olObject.reversed = true|false Prope 2 min read HTML | DOM Ol type Property The DOM Ol type Property is used to set or return the type attribute in an ordered list. This attribute defines which type(1, A, a, I and i) of order you want in your list numeric, alphabetic or roman numbers. Syntax: It is used to return the type property. olObject.type It is used to set the type p 2 min read HTML | DOM Form enctype Property The Form enctype property in HTML DOM is used to set or return the value of the enctype attribute in a form. This attribute specifies the data that will be present in the form should be encoded when submitting to the server. This type of attribute can be used only if method = "POST". Syntax: It is u 3 min read HTML DOM Form reset() Method The reset() method in the HTML DOM is used to reset a form fields to their default values. When a form is reset, all user input is cleared, and the fields revert to their initial states.SyntaxformObject.reset()Example: In this example, clicking the reset button clears the form inputs. html<!DOCTY 1 min read HTML | DOM Form submit() Method The form submit() Method in HTML DOM is used to send the form data to the web-server. It works as same as submit button. It does not contain any parameters. Syntax: formObject.submit()Example: index.html<!DOCTYPE html> <html> <head> <title> HTML DOM Form submit() Method </ 1 min read Like