1. The new DOCTYPE
Even if the browser does not understand this sentence, it will be rendered in standard mode.
2. Figure elements
Use Lai to semantically represent a picture with a title
This is an image of something interesting.
3. Redefined
has been redefined and is now used to represent small typography, such as the copyright notice at the bottom of the site
4. Remove the type attribute from link and script tags
5. Add/No parentheses
HTML5 No strict requirements attributes must be enclosed in quotation marks, closed, but with quotation marks and closed tags
6. Make your content editable, just add a contenteditable property
7. Email Inputs
If we set the type of input to e-mail, the browser will verify that the input is an email type, but it must not rely on the front-end checksum, and the backend must have a corresponding checksum of
8. Placeholders
The meaning of this input property is that you do not have to use JavaScript for placeholder effect
9. The Local Storage
uses localstorage to permanently store large pieces of data on the client side (unless it is actively deleted), most browsers already support it and can detect if window.localstorage exists before using
10. Semantic header and Footer
11. More HTML5 form features
12. IE and HTML5
by default, HTML5 new elements are rendered inline, but you can allow
to render in block mode
Header, footer, article, section, Nav, menu, Hgroup {
Display:block;
}
Unfortunately, IE ignores these styles and can fix:
document.createelement_x ("article") as follows;
Document.createelement_x ("footer");
document.createelement_x ("header");
document.createelement_x ("Hgroup");
document.createelement_x ("Nav");
document.createelement_x ("menu");
Hgroup
is typically used in the header to group headings together, such as
Recall Fan Page
People who want the memory of a lifetime.
. Required Properties
The Required property defines whether an input is required, and you can declare it as follows
Or
The. Autofocus Property
As its meaning is, it's focused on the input box.
. Audio Support
HTML5 provides tags, you don't need to follow third-party plug-ins to render audio, most modern browsers offer support for Html5audio, but still need to provide some compatible processing, such as
Download this file.
. Video Support
Like audio, the tag provides support for video, because the HTML5 document does not specify a specific encoding for video, so the browser decides which encodings to support, causing a lot of inconsistencies. Safari and IE support the encoded format of H. Theora and Vorbis encoded format, Firefox and Opera, when using HTML5 video, you must provide:
Your browser is old. Download this videoinstead.
18. Pre-load Video
The Preload property is as simple as its literal meaning, and you need to decide whether you need to preload the video when the page loads
19. Display Video Control
20. Regular Expressions
Because of the pattern attribute, we can use regular expressions directly in your markup.
Create a Username:
<> 10″pattern= "[a-za-z]{4,10}" autofocusrequired>
21. Detection attribute Support
In addition to Modernizr, we can easily detect whether some properties are supported by JavaScript, such as:
Mark Element
Think of the element as a highlight, and when I select a piece of text, the markup effect of JavaScript on HTML should look like this:
Search Results
They were interrupted, just after Quato said, "Open Yourmind".
23. When to use
HTML5 has introduced so many elements, so div do we still need to use it? div You can use when there are no better elements.
24. Want to use HTML5 now?
Don't wait 2022, you can use it now, just do it.
25. Which is not HTML5
1) SVG
2) CSS3
3) geolocation
4) Client Storage
5) Web Sockets
The. Data property
Bla bla
Used in CSS:
Don ' t Touch Me
. Output element
element is used to display the result of the calculation, and there is a for property like the label
28. Create a slider with range input
The range type referenced by HTML5 can create a slider that accepts Min, Max, step, and Value properties
You can use CSS: Before and: After to display the values of min and Max
Input[type=range]:before {content:attr (min); padding-right:5px;
}
Input[type=range]:after {content:attr (max); padding-left:5px;}
What are the real new features of HTML5?