1. New Doctype Although using , even if the browser does not understand this sentence, it will render according to the standard mode 2. Figure element Use and to semantically represent captioned images
This is an image of something interesting.
3. Redefined has been redefined and is now used to mean small Typesetting, such as the copyright statement at the bottom of the website 4. Remove the type attribute in the link and script tags 5. Add/without brackets HTML5 does not have strict requirements that attributes must be added Quotes, closed or not, but it is recommended to add quotes and closing tags 6. To make your content editable, just add a contenteditable attribute 7. Email Inputs If we Set the input type to email, and the browser will verify whether the input is of email type. Of course, you cannot just rely on the front-end verification, the back-end must also have corresponding verification 8. Placeholders The meaning of this input attribute is that there is no need to use javascript to achieve the placeholder effect 9. Local Storage Using Local Storage, you can permanently store large data fragments on the client (unless you actively Delete), currently supported by most browsers, you can check whether window.localStorage exists before using it 10. Semantic header and footer 11. More HTML5 form features 12. IE and HTML5 By default, new HTML5 elements are rendered inline, but you can use the following method to make render them in block header, footer, article, section , nav, menu, hgroup { display: block; } Unfortunately IE will ignore these styles, you can fix it like this: document.createElement("article"); document.createElement("footer"); document.createElement("header"); document.createElement("hgroup"); document.createElement("nav"); document .createElement("menu"); 13. hgroup is generally used to group a group of titles together in the header, such as
Recall Fan Page
Only for people who want the memory of a lifetime.
14. Required attribute The required attribute defines whether an input is required. You can declare
or
15 as follows . Autofocus attribute Just like its meaning, it is to focus on the input box
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn