Play HTML5 (i)-----inventory HTML5 new Cool input types and attributes

Source: Internet
Author: User
Tags local time

Please cherish the small series of labor results, the article for the original small. Reprint please indicate the source.


Today, I started studying HTML5. Compared to the previous version number of HTML. HTML5 added a lot of features, properties, so that we made out of the interface more gorgeous. And it's super easy to use, and this article first says those input types and attributes that HTML adds.

This code is implemented under the Cheetah browser.

HTML5 the new input types are: Email,url,number,range,date Pickers,datalist,telephone,search,color

Email: at the time of submission, you will be actively verifying that the input content meets the format

E-mail: <input type= "Email" name= "User_email"/>


URL: When committing, it will proactively verify that the input content is a URL

URL: <input type= "url" name= "User_url"/>


Number : for entering numbers, Min is the minimum value. Max is the maximum value, step is the click arrow is the number of changes, value is the default value, Min,max,step,value can not write

Age: <input type= "number" name= "User_age" min= "" max= "" "step=" 1 "value="/> "


Range: for input fields that should include numeric values within a range, shown as sliders

Scale: <input type= "range" name= "User_range" min= "ten" max= "/></br>"

Date pickers: There are several types of date,month,week,time,datetime,datetime-local.

date--Select Month Day, Month---Select year, Week---Choose the annual week. time--select hours and minutes, datetime--Select month-date time. datetime-local--Select local time

Here's to a datetime-local.

Time: <input type= "datetime-local" name= "User_date"/>


DataList: Equivalent to a drop-down list, with its own active supplementary function

URL: <input type= "url" list= "url_list" name= "link" required/>      <!--own initiative to add-on <datalist id=             "Url_ List ">               <option label=" Web1 "value=" http://www.web1.com.cn "/>               <option label=" web2 "value=" http ://www.web2.com "/>               <option label=" web3 "value=" http://www.web3.com "/>             </datalist>


Color: Colour Picker

Color: <input type= "Color"/>


There are two other types of telephone and search. Because I don't see the effect when I use it, I don't write it here. Let's try it for ourselves.



Play HTML5 (i)-----inventory HTML5 new Cool input types and attributes

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.