Html Label (with HTML5 property)

Source: Internet
Author: User
Tags html form


Http://www.w3school.com.cn/tags/tag_input.asp

HTML <input> Tags instance

A simple HTML form that contains two text input boxes and a submit button:

<form action= "form_action.asp" method= "get" >
  name: <input type= "text" name= "fname"/>
  Name: <input type= "text" name= "lname"/> <input type=
  "Submit" value= "Submit"/>
</form>

Give it a shot yourself.

(You can find more instances at the bottom of the page) browser support

IE Firefox Chrome Safari Opera

All browsers support <input> tags. Definitions and Usage

<input> tags are used to collect user information.

The input field has many different forms depending on the value of the type attribute. The input field can be a text field, a check box, a text control after the mask, a radio button, a button, and so on. the difference between HTML and XHTML

The,<input> tag in HTML has no end tag.

,<input> tags must be properly closed in XHTML. tips and Comments:

Tip: Use the label element to define labels for a form control. Property

NEW: HTML5 property in the.

Property value Description
Accept Mime_type Specify the type of file submitted through the file.
Align Left right top middle bottom Not in favor of use. Specify the alignment of the image input.
Alt Text Defines alternate text for image input.
AutoComplete On off Specify whether to use the AutoComplete feature of the input fields.
Autofocus Autofocus

Specify whether the input field gets the focus when the page loads.

(Not applicable to type= "hidden")

Checked Checked Specify that this input element should be selected for the first load.
Disabled Disabled Disables this element when the input element is loaded.
Form FormName Specify one or more forms to which the input field belongs.
FormAction Url

Overrides the Action property of the form.

(Applies to type= "Submit" and type= "image")

Formenctype See note

Overrides the Enctype property of the form.

(Applies to type= "Submit" and type= "image")

FormMethod Get post

Overrides the form's Method property.

(Applies to type= "Submit" and type= "image")

Formnovalidate Formnovalidate

Overrides the Novalidate property of the form.

If this property is used, no validation is made when the form is submitted.

Formtarget _blank _self _parent _top framename

Overwrites the target attribute of the form.

(Applies to type= "Submit" and type= "image")

Height Pixels% Defines the height of the input field. (Applies to type= "image")
List Datalist-id Refers to the DataList that contains the predefined options for the input field.
Max Number Date

Specify the maximum value for the input field.

Use with the Min attribute to create a range of legitimate values.

MaxLength Number Specify the maximum length of characters in the input field.
Min Number Date

Specify the minimum value for the input field.

Use with the Max attribute to create a range of legitimate values.

Multiple Multiple If this property is used, more than one value is allowed.
Name Field_name Defines the name of the INPUT element.
Pattern Regexp_pattern

A pattern or format that prescribes the value of the input field.

For example, pattern= "[0-9]" indicates that the input value must be a number between 0 and 9.

Placeholder Text Provides tips for helping users fill out input fields.
ReadOnly ReadOnly Specify that the input field is read-only.
Required Required Indicates that the value of the input field is required.
Size Number_of_char

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.