Multiple-Line Text Input Controls in HTML

The multiple-line text input is used when the user is required to give details that may be longer than a single sentence. Multi-line input controls are created using HTML <textarea> tag. Example :
<!DOCTYPE html>
<html>
   <head>
	  <title>Text Input Control</title>
   </head>
   <body>
     <form action="login_page.php" method="post">
	Details : <br />
	<textarea rows="5" cols="30" name="details">
        Enter your details  here
	</textarea> 
     </form>
   </body>
</html>
The output of above code will be :


Attributes :

The attributes used in the multiple line text input control are as follows :

  • name : Used to give a name to the control which is sent to the server to be recognized and get the value.
  • rows : Used to specify the number of rows of text area box.
  • cols : Used to specify the number of cols of text area box.



Next Topic :