The difference between <input> and <textarea> in HTML

Source: Internet
Author: User

There are two ways to express a text box in HTML, one single-line text box for a <input> element, and a multi-line text box for <textarea>.

<input> elements:

1. Be sure to specify the value of type text;

2. Specify the length of the display character by the Size property, the Value property specifies the initial value, and the MaxLength property specifies the maximum length that the text box can enter;

1  <  type= "text"  value= "Getting Started dog"  size= "Ten"  Maxlength  = "> "

<textarea> elements

1. Use the <textarea></textarea> tag pair

2. The content is placed in the <textarea></textarea> label pair

3. Specify size using row, col

1 <  row= "3"  col= "4"> Entry Dog Blog Park </textarea >

Difference: One is a single-line text box and one is a multiline text box.

The difference between <input> and <textarea> in HTML

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.