1. What’s new in HTML5?
New features: HTML5 is no longer a subset of SGML, but more about graphics, location, storage, multitasking, etc
New selector document. QuerySelector, document. QuerySelectorAll Drag release (Drag and drop) API
Media playback video and audio localStorage localStorage and sessionStorage
LocalStorage closed page is not cleared, sessionStorage closed page is automatically cleared
Offline application Manifest desktop notification Notifications semantic tags article, footer, Header, nav, section
HTML5 semantic tags refer to the right tags that contain the right content, are well structured and easy to read, such as nav, article, header, footer, etc.Copy the code
Enhanced form controls Calendar, Date, Time, email, URL, search Geolocation multi-task Webworker
In AN HTML page, if the state of the page is unresponsive at the time the script is executed, the page does not become responsive until the script is executed. Web workers are js running in the background, independent of other scripts, and do not affect your page performance. The result is passed back to the main thread via postMessage. This will not block the main thread during complex operations. How to create web workers: - Check browser support for Web workers - Create Web worker files (JS, postback functions, etc.) - Create Web worker objectsCopy the code
Full duplex communication protocol Websocket
History management history cross-domain resource sharing (CORS) access-control-allow-origin page visibilitychange event visibilitychange cross-window communication PostMessage is related to webworkers
Form Data object draws canvas
Removed elements:
Pure performance elements: Basefont, Big, Center, FONT, S, Strike, TT, U Elements that negatively affect usability: Frame, Frameset, Noframes