Some parameter descriptions of text input boxes in web design

Some parameter descriptions of text input boxes in web design
<br />In general guestbooks, forums and other places, text input boxes are used, which are textarea in HTML language. Textarea contains numerous parameters. Once you learn how to use these parameters, you can modify the size and appearance of the text input box at will to achieve the effect you want. The following will introduce these parameters and how to use them.
1. cols, vertical columns. In the absence of stylesheet settings, it represents the number of bytes that can fit on a line. For example, cols=60 means that a line can hold up to 60 bytes, or 30 Chinese characters. Also note that the width of the text box is adjusted through this. Enter the value of cols, and then define the font size of the input text (if not defined, the default value will be used), then the width of the text box will be determined.
2. rows, horizontal columns. Indicates the number of rows that can be displayed. For example, rows=10 means that 10 rows can be displayed. If there are more than 10 lines, you need to drag the scroll bar to browse. (As above, the height of the text box is controlled by this.)
3. Name, the name of the text box. This item is essential because it must be used when storing text.
4. warp. When warp="off", it means that the text area will not wrap automatically. Of course, if it is not specified, the text area will wrap automatically by default. This parameter is generally used less frequently.
5. Style: This is a very practical parameter that can be used to set the background color of the text box, the color and style of the scroll bar, the border color, the size and color of the input font, etc.
6. Class is generally used to call settings in external CSS.
Example 1: Set the number of rows and columns of the text box to 40 and 10 respectively. The name is text. Expression format <textarea cols=40 rows=10 name=text></textarea>
Example 2: Cancel the scroll bar on the right side of the text box. Expression form <textarea cols=40 rows=10 name=text style="overflow:auto"></textarea>. style="overflow:auto" means that the scroll bar will be automatically displayed when the input text exceeds the set number of lines.
Example 3: Set the background color of the text box. <textarea cols=40 rows=10 name=text style="background-color:BFCEDC"></textarea>.
Example 4: In addition, you can set the scroll bar color, border color, font size, color, line spacing, etc. of the text box directly in the style. However, these are generally set in CSS and can be called directly. The following is a piece of CSS setting code: It should be easy to understand. The settings in the textbox are the background color of the text box, the top, bottom, left, and right border colors and thickness, as well as the input font size, etc.
<style>
.textbox { BACKGROUND: #BFCEDC; BORDER-TOP: #7F9DB9 1px solid; BORDER-LEFT: #7F9DB9 1px solid; BORDER-RIGHT: #7F9DB9 1px solid; BORDER-BOTTOM: #7F9DB9 1px solid; FONT-FAMILY: "宋体", "Verdana", "Arial", "Helvetica"; FONT-SIZE: 12px; TEXT-ALIGN: LIFT;}
</style>
Insert the above code between the <head> and </head> of the page. Calling method: <textarea cols=40 rows=10 name=text class="textbox"></textarea>. The name in class="" corresponds to the name of the setting to be used in CSS. Once you are familiar with these parameters, it will be very convenient to modify and beautify the text input box.

<<:  Detailed steps for debugging VUE projects in IDEA

>>:  Mysql implements regular clearing of old data in a table and retaining several pieces of data (recommended)

Recommend

How to use MySQL limit and solve the problem of large paging

Preface In daily development, when we use MySQL t...

Vue implements a simple shopping cart example

This article shares the specific code of Vue to i...

Detailed explanation of transactions and indexes in MySQL database

Table of contents 1. Affairs: Four major characte...

How to use nginx to access local static resources on Linux server

1. Check whether port 80 is occupied. Generally, ...

Implementation steps for setting up the React+Ant Design development environment

Basics 1. Use scaffolding to create a project and...

How to add double quotes in HTML title

<a href="https://www.jb51.net/" titl...

Summary of common problems and solutions in Vue (recommended)

There are some issues that are not limited to Vue...

JavaScript array merging case study

Method 1: var a = [1,2,3]; var b=[4,5] a = a.conc...

Detailed explanation of the use of Teleport in Vue3

Table of contents Purpose of Teleport How Telepor...

How to build a private Docker repository using Harbor

Table of contents 1. Open source warehouse manage...

Why is your like statement not indexed?

Preface This article aims to explain the most bor...

JS implements user registration interface function

This article example shares the specific code of ...