Stardom H5 tour-HTML5 forms add elements and attributes, h5-html5

Source: Internet
Author: User

Stardom H5 tour-HTML5 forms add elements and attributes, h5-html5

1. Tag control attributes

In HTML5, you can place a form element inside the tag and access the form element through the control attribute of the tag.

1 <! DOCTYPE html> 2 

 

Textbox placeholder attributes

Placeholder indicates the input prompt displayed when the text box is in the unentered status. When the text box is in the unentered status and does not obtain the cursor focus, the entered prompt text is displayed in a fuzzy manner.

1 <! DOCTYPE html> 2 

 

Text Box list attributes

In HTML5, a list attribute is added to the single-line text box. The value of this attribute is the id of a datalist element. The datalist element is also a new element in HTML5. This element is similar to a selection box. However, if the value you want to set is not included in the selection list, you can enter it by yourself. The datalist element is not displayed, but is displayed as a prompt when the focus is obtained in the text box.

1 <! DOCTYPE html> 2 

 

Text Box AutoComplete attributes

1 <! DOCTYPE html> 2 

 

Pattern attribute of the text box

SelectionDirection attribute of the text box

Indeterminate attribute of the check box

The height and width attributes of the image submit button

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.