Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the new properties of html5

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Today, the editor will share with you the relevant knowledge points about the new attributes of html5, which are detailed and logically clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.

The new attributes introduced by html5 are: seamless, srcdoc, sandbox, manifest, charset, sizes, base, defer, defer, async, media, hreflang, ref, reversed, start and so on.

The operating environment of this tutorial: windows10 system, HTML5 version, Dell G3 computer.

What new attributes have been introduced by html5

New properties:

The attribute to add to the js.

If you do not have the above two attributes, the execution order is to load (download) the first src first, then execute its onload, and then synchronously execute the defer attribute downwards before h6. Input delay loading (deferred execution) will first load (download) the contents of the file in src, and then load the js.async attribute in onload asynchronously after all the pages have been loaded. It will load the js.async attribute in onload after loading src. Execute onload immediately, while continuing to load the page in the above execution order. The alert display will show b first and then a.

Add the style code of small icons to the tags in the web page

Ordered list ol: added start (list start value), reversed (inverted or not) menu menu type attribute (3 menu types) embedded css style: define a style block (scoped) inside the tag, only valid embedded frame inside the style tag: iframe element, added seamless borderless borderless, srcdoc defines the content of the embedded frame

New attributes:

Manifest attribute:

Define the offline application files that need to be used on the page, usually in the tag

Charset attribute:

One of the meta attributes that defines the character set of the page

Sizes attribute:

Added property to set icon size when link rel= "icon"

Base attribute:

Indicates that when a page is opened in a new window, the contents of the href are prefixed to the address

Defer attribute:

Script tag attribute, indicating that after the script has been loaded, it will be executed only when the page is loaded (deferred execution)

Async attribute:

Script tag attribute, which is executed immediately after the script is loaded (the browser will parse the following during the run), even if the page has not been loaded yet (asynchronous execution)

Media attribute:

Element attribute: indicates which device to optimize

Hreflang attribute:

That represents the language used by the URL pointed to by the hyperlink

Ref attribute:

That defines whether the hyperlink is an external link

Reversed attribute:

That defines whether the sequence number is flashback

Start attribute:

That defines the starting value of the sequence number

Scoped attribute:

Embedded CSS style attributes that define that style is limited to elements that own the embedded style and is suitable for single-page development

These are all the contents of the article "what are the New attributes of html5". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report