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 28 new features in HTMl5?

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

Share

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

This article mainly introduces what are the 28 new features of HTMl5. It is very detailed and has certain reference value. If you are interested, you must finish reading it.

1. New Doctype

Despite the use, even if the browser does not understand this sentence, it will render in standard mode.

2. Figure element

Use and to semantically represent a picture with a title

About image

This is an image of something interesting.

3. Redefined

Has been redefined and is now used to denote small typesetting, such as the copyright notice at the bottom of the website

4. Remove the type attribute from the link and script tags

5. With / without parentheses

HTML5 does not strictly require that attributes must be closed in quotation marks, but it is recommended to add quotation marks and closing tags.

6. To make your content editable, just add a contenteditable attribute

7. Email Inputs

If we set the type of Input to email, the browser will verify whether the input is of type email. Of course, we can't only rely on the front-end verification, but also the back-end verification.

8. Placeholders

The meaning of this input attribute is that you don't have to use javascript to do the placeholder effect.

9. Local Storage

Using Local Storage, you can permanently store large pieces of data on the client (unless actively deleted). At present, most browsers already support it. You can detect the existence of window.localStorage before using it.

10. Semantic header and footer

11. More HTML5 form features

12. IE and HTML5

By default, new HTML5 elements are rendered as inline, but you can make

It is rendered in block mode

Header, footer, article, section, nav, menu, hgroup {

Display: block

}

Unfortunately, IE ignores these styles, and you can fix them like this:

Document.createElement ("article")

Document.createElement ("footer")

Document.createElement ("header")

Document.createElement ("hgroup")

Document.createElement ("nav")

Document.createElement ("menu")

13. Hgroup

It is generally used in header to group a set of headings together, 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, and you can declare it as follows

Or

15. Autofocus attribute

Just like its meaning, it is focused on the input box.

16. Audio support

HTML5 provides tags, you no longer need to render audio according to third-party plug-ins, most modern browsers provide support for HTML5 Audio, but you still need to provide some compatible processing, such as

Download this file.

17. Video support

Much like Audio, tags provide support for video, and because the HTML5 document does not specify a specific encoding for video, the viewer decides which encodings to support, resulting in a lot of inconsistencies. Safari and IE support H.264 encoding format, Firefox and Opera support Theora and Vorbis encoding format, when using HTML5 video, you must provide both:

Download this video instead.

18. Preload 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 expression

Because of the pattern attribute, we can use regular expressions directly in your markup.

Create a Username:

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