HTML5 smart forms
1: Form forms for easy formatting
To facilitate formatting, HTML5 can remove form tags from form nesting.
Method: id is specified for form, and the form = id attribute is added for all label labels.
For example:
2: New form Type
Type = "email" Mailbox (built-in format verification)
Type = "url" url, which must contain the Protocol (built-in format validation)
Type = "date" date Selector
Type = "time" time Selector
Type = "month" month Selector
Type = "week" week Selector
Type = "number" Digital Selector
Type = "range" Slider
Max attributes
Step attribute (Verify validity) step = "2", for example, starting from 0, you can only select 0-2-4-6-8
Type = "search" search box
Results = "n": the Google browser is available and the search icon is displayed.
Type = "color" color selector
3: New Form attributes
Required = "required"
Placeholder = "I am the default value" sets the default value and is not submitted to the background.
Autofocus = "autofocus" Auto Focus
Pattern = "\ d {3}" Custom Regular Expression
4: automatically fill the form
People are on chinamoocs
Chelaway
Taibei
5: output tag