What are the HTML Text field label properties? HTML text field label attribute usage Introduction

Source: Internet
Author: User
This article focuses on the properties and simple usages of HTML text field textarea tags. The article content is very simple, very easy to learn, the code is very basic code, or no difficulty code, so want to learn please seriously yourself knocking code. Let's take a look at this article next.

First, let's look at the properties of the HTML text field textarea tag:

<textarea> tags define multiple lines of text input controls.

The text area can hold an unlimited amount of text, where the default font for text is the equal-width font (usually courier).

The size of the textarea can be specified by the cols and rows properties, but a better approach is to use the height and width properties of the CSS.

Tip: You can set the line break mode in the text input area via the Wrap property of the <textarea> tag.

Now say a simple use of HTML textarea tags:

<textarea rows= "5" cols= ">" In the PHP Chinese web, you can find all the online programming courses you need. </textarea>

This only uses the Cols property and the Rows property, and the effect

This is the simplest use of TEXTAREA tags in HTML text fields, which is used to let others enter text.

Now, focus on the Wrap property:

Wrap: Lets you specify how text content is displayed when it is larger than the text width.

The Wrap attribute of the TEXTAREA tag is the table:

    • When warp= "off" means that the text area is not wrapped, if the compiler is three rows, then the display interface is three rows, if the text field content more than the width of the text box, the Text field will appear in the horizontal scroll bar. Of course not write the default is the automatic line.

    • When wrap= "virtual/(soft)" implements line wrapping within a text field, but when it is transferred to the server, the text wraps only where the user presses the ENTER key. (Virtual and soft are equivalent, except that soft is a property value that later appears in H5, which is not normally used in H5). belongs to automatic soft return line wrapping.

    • When wrap= "physical/" is wrapped in a solid line text field, it is routed to the server in this form. (physical and hard are equivalent, and the same hard is the attribute value that appears later in the H5.) ) belongs to the auto-hard return line wrap.

Note: If the CSS style has a set height and width, follow the CSS style!!! Rows and cols are meaningless, but if you wrap= "hard" You must specify the properties of cols.

The above is the HTML text field textarea all the contents of the label, the problem can be asked below.

Related Article

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.