The new attributes introduced by html5 are: seamless, srcdoc, sandbox, manifest, charset, sizes, base, defer, defer, async, media, hreflang, ref, reversed, start, etc.
The operating environment of this tutorial: Windows 10 system, HTML5 version, Dell G3 computer.
New attributes:
Attributes added to js.
If there are no above two attributes, the execution order is loading (downloading) first A src, then execute its onload, and then execute it synchronously downwards. The defer attribute already exists before h5. Enter delayed loading (delayed execution). It will first load (download) the content of the file in src, and then wait for the page. After all loading is completed, the js.async attribute in onload is loaded asynchronously. It will execute onload immediately after loading src, and will also continue to load the page in the above execution sequence. The alert display will display b first and then a
Add the style code of the small icon to the tag in the webpage
Ordered list ol: Added start (list starting value), reversed (whether reversed) menu menu type attribute (3 menu types) embedded css style: define a style block inside the label (scoped), only valid within the style tag. Inline frame: iframe element, seamless, borderless, and borderless are added. srcdoc defines the content of the inline frame.
Define the offline application files that the page needs to use, generally Place it in the tag
charset attribute: one of themeta attributes that defines the character set of the page
sizes attribute :New attribute, when link’s rel="icon", is used to set the icon size
base attribute:script tag attribute, indicating that after the script is loaded, it will only be executed when the page is also loaded (delayed execution)
async attribute :script tag attribute, executed immediately after the script is loaded (the browser will parse the following content during operation), even if the page has not been loaded yet (asynchronous execution)
media attribute:Element attribute: Indicates which device is optimized
hreflang attribute:< ;a> attribute, indicating the language used by the URL pointed to by the hyperlink
ref attribute:attribute, defining whether the hyperlink is an external link
reversed attribute:
The attribute of the embedded CSS style, defines that the style is limited to Elements with this embedded style are suitable for single-page development
Recommended tutorial: "
html video tutorialThe above is the detailed content of What new attributes did html5 introduce?. For more information, please follow other related articles on the PHP Chinese website!