Some parameter descriptions in the text input box in Webpage Design _ HTML/Xhtml _ webpage Creation

Source: Internet
Author: User
Text input boxes are used in common message books, forums, and other places, that is, textarea in the html language. textare contains many parameters. Learn to use these parameters, you can modify the size and appearance of the text input box to achieve the desired effect. The following describes these parameters and how to use them. 1. cols, vertical column. Text input boxes are used in common message books, forums, and other places without a style sheet, that is, textarea in the html language. textare contains a large number of parameters and learns to use these parameters, you can modify the size and appearance of the text input box to achieve the desired effect. The following describes these parameters and how to use them.
1. cols, vertical column. If no style sheet is set, it indicates the number of bytes that can be accommodated in a row. For example, cols = 60 indicates that a row can contain up to 60 bytes, that is, 30 Chinese characters. Note that the text box width is adjusted by entering the cols value, and then defining the font size (if not defined, the default value is used ), then the text box width is determined.
2. rows: horizontal column. The number of rows that can be displayed. For example, rows = 10 indicates that 10 rows can be displayed. If there are more than 10 rows, You need to drag the scroll bar to browse. (Same as above, the height of the text box is controlled through this .)
3. name: the name of the text box, which must be used for text storage.
4. warp. When warp = "off" indicates that the text area does not wrap automatically. If this parameter is left blank, the text is automatically wrapped by default. This parameter is rarely used.
5. style: This is a very practical parameter. It can be used to set the background color, scroll bar color and form, border color, and font size and color of the input text box.
6. class is generally used to call the settings in the external css.
Example 1: set the number of rows in the text box to 40 and the number of columns to 10. The name is text. Expression Form
Example 2: cancel the scroll bar on the right of the text box. Expression Form . Style = "overflow: auto" means that the scroll bar is automatically displayed when the input text exceeds the set number of lines.
Example 3: Set the background color of the text box. .
Example 4: In addition, you can set the scroll bar color, border color, font size, color, and line spacing of the text box directly in the style. But these are generally used to setting in CSS, just call them directly. The following is a piece of CSS setting code: it should be easy to understand. In the textbox, the background color, the upper and lower sides of the border color and thickness, and the size of the input font are set in sequence.

Insert the above Code intoAnd. Call method: . The name in class = "" corresponds to the name of the settings used in css. With these parameters familiar, you can easily modify and beautify text input boxes.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.