The HTML code to add a form text field is ""; the textarea tag is used to define a multi-line text input control, that is, a text field, which can accommodate an unlimited amount of text , the size of the textarea can be specified through the cols and rows attributes.
The operating environment of this article: Windows 10 system, html5 version, Dell G3 computer.
The
The text area can hold an unlimited amount of text, and the default font for the text is a fixed-width font (usually Courier).
You can specify the size of the textarea through the cols and rows attributes, but a better way is to use the CSS height and width attributes.
In the text input area, use "%OD%OA" (carriage return/line feed) to separate lines of text.
You can set the line wrapping mode in the text input area through the wrap attribute of the
The example is as follows;
<html> <head> <meta charset="utf-8"> <title>123</title> </head> <body> <textarea rows="10" cols="30"> 我是一个文本框。 </textarea> <textarea></textarea> </body> </html>
Output result:
Recommended tutorial: "html video tutorial 》
The above is the detailed content of What is the HTML code to add a form text field?. For more information, please follow other related articles on the PHP Chinese website!