HTML5 is no longer the subset of SGML, mainly to add functions such as image, location, storage, multi -tasking. HTML5 is an upgraded version of HTML4. Compared with the latter, HTML5 adds the expressiveness of the web webpage, and also adds new features such as forms and local data. The innovation of many functions in HTML5 and reform are a good guidance for our future website construction.
Painting canvas;Video and Audio elements used to play the media;
Local offline storage LocalStorage storage data for a long time, the data is not lost after the browser is closed; the data of SessionStorage is automatically deleted after the browser is closed;
Better content elements such as Article, Footer, Header, NAV, Section;
Form control, Type attributes include Calendar, Date, Time, Email, URL, Search;
The removal elements are: pure expression elements: Basefont, Big, Center, FONT, S, Strike, TT, U;
Support HTML5 new label: IE8/IE7/IE6 supports labels generated by the Document.createElement method. You can use this feature to allow these browsers to support the new HTML5 tags. After the browser supports the new tag, you also need to add the default style of label.
Among them, the INPUT label has added a lot of new attributes, let me list:Specify the autofocus property specifies the autopocus property of Input, Select, Textarea and Button. It automatically gets the focus after the page is loaded in a specified attribute. There is only one element on a page that has an autofocus attribute. At the same time, set multiple sets, then the first effect. When the input box gets the focus, it is prompted to disappear.
This attribute is very useful for the login page, which can enhance the user experience. Sometimes the login page is a user name and password. After the page is loaded, the user must manually position it to the input box to enter. With Autofocus, the page can be directly entered.
The DatePicker, Number, and Range add MAX, Min, Step attributes. MAX attribute specifies the maximum value allowed in the input domain.
The min attribute specifies the minimum value allowed in the input domain.
The STEP attribute is a legal digital interval specified in the input domain. (If Step = 3, the legal number should be -3, 0, 3, 6, and so
And the MIN attributes are used to create the scope of legal value.
pattern attributeThe pattern attribute is used to verify the mode of input fields. In fact, it is a regular expression. It is very convenient to write JS binding regular verification.
Pattern attributes are suitable for the Text, Search, URL, Telephone, Email, Password.
Example: Define the pattern as [az] {3} to the input box, which is the regular expression constraint that contains three letters. If the input is unsatisfactory, we will see the following effect.
Multiple attributeMultiple attributes specify that multiple values can be selected in the input domain.
The Multiple attribute is suitable for the Email, File of Input. Multiple files are uploaded at a time.
The above is the newly added label and function summary introduced by the editor to you. I hope it will be helpful to everyone. If you have any questions, please leave me a message. Xiaobian will reply to everyone in time. Thank you very much for your support for the VEVB Wulin website!