Text input fields are required when users need to enter large pieces of text in the form.
Grammar:
<textarea rows="行数"cols="列数">文本</textarea>
1、<textarea>标签是成对出现的,以<textarea>开始,以</textarea>结束。
2、cols :多行输入域的列数。
3、rows :多行输入域的行数。
4、在<textarea></textarea>标签之间可以输入默认值。
举例:
<form method= "POST" action= "save.php" > <label> 联系我们</label> <textarea cols="50" rows="10" > 在这里输入内容... </textarea> </form>
Note: The <label> tag in the code is explained later.
Display the results in the browser:
Note that these two properties can be replaced by the width and height of the CSS style: col with width, row with height instead. (These two CSS styles will be explained in a later chapter)
Example:
<!DOCTYPE HTML><HTML><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8"><title>Text field</title></Head><Body><formAction= "save.php"Method= "POST" > <label>Personal Profile:</label> <BR/> <textareacols= " the"rows= "Ten">Enter the content here ...</textarea> <BR/> <inputtype= "Submit"value= "OK"name= "Submit" /> <inputtype= "Reset"value= "Reset"name= "Reset" /></form> </Body></HTML>
Text fields, multi-line text input support