Home  >  Article  >  Web Front-end  >  Detailed explanation of the difference between H5 and HTML4

Detailed explanation of the difference between H5 and HTML4

Y2J
Y2JOriginal
2017-05-23 13:53:523233browse

Although HTML5 does not completely subvert HTML4, they also have some differences. This article has compiled some visible differences. Just master some first. It is not too late to study them in detail after all are supported. Interested friends should not miss it.

HTML5 is the next version of the HTML standard. Although HTML5 does not completely subvert HTML4, there are some differences. For the latest and most complete HTML5-HTML4 comparison information, please see http://dev.w3.org/html5/html4-differences/, which seems to be slightly more. In this world where IE still exists, it is enough to understand some of the differences of HTML5 first, and it will not be too late to study it in detail after it is fully supported.

1. Simplified syntax
HTML5 simplifies many subtle syntax, such as doctype declaration, you only need to write aba7b36f87decd50b18c7e3e3c150106. HTML 5 specifies UTF-8 encoding as follows48e802e877e22739867de2b4093d796b

2. cd46f793cc4753c4de95ba841d0c3346 tag allows developers to interact with users through UI using only one tag.

3 NewMany tags
One principle of HTML5 design is to better reflect the semantics of the website, so 1aa9e5d373740b65a0cc8f0a02150c53 and < Tags like ;footer> are used to clearly indicate the structure of the web page; the new 2f8332c8dcfd5c7dec030a070bf652c3 and 23c3de37f2f9ebcb477c4a90aac6fffd tags, 2f8332c8dcfd5c7dec030a070bf652c3 and 23c3de37f2f9ebcb477c4a90aac6fffd are also helpful to clarify the structure of the web page and are more beneficial to SEO ; Added 5c0e96d12fc7501cef2ae2efde646ee0 and 24203f2f45e6606542ba09fd2181843a tags, 5c0e96d12fc7501cef2ae2efde646ee0 can be used to create traditional menus, as well as toolbars and context menus. The 24203f2f45e6606542ba09fd2181843a tag makes the layout of web text and images more professional; the new b97864c2e0ef2353a16c4d64c7734e92 and 39000f942b2545a5315c57fa3276f220 tags are added. These two tags may be the two most useful tags in HTML5. It is also extremely convenient to use. For example, embedding video in an HTML5 page only requires a short piece of

code as follows:

<video width="450" height="340" controls>  
  <source src="jamshed.mp4" type="video/mp4">  
   Your browser does&#39;nt support video embedding feature.  
</video>


Similarly, audio and other others are similar.

4. Brand new form
HTML5 has made a lot of modifications to the ff9c23ada1bcecdd1a0fb5d5a0f18437 and 4afa1c2448733e16c7036e9bfce85f7d tags, added many new attributes, and also modified many attributes.

5. Delete a4b561c25d9afb9ac8dc4d70affff419 and 240cb830ca84ebaabbd07850110b414d tags, 04a0d55efbbfd646a993fbc01f262c57, bacbf9e1ad7f40415ce1670e31edfee3, 3d49bde0e0b2e042578ad34140b6c48e tags

6.HTML5 supports different types of storage types

HTML5 supports local storage, which was implemented through Cookie in previous versions. HTML5 local storage is fast and safe. And HTML5 has two different objects that can be used to store data. HTML5 stores and accesses data through JS:

localStorage is suitable for long-term storage of data, and the browser is closed The data will not be lost
sessionStorage is only for data storage of a session. The stored data will be automatically deleted after the browser is closed

In general, HTML5 has surpassed markup language In this category, more semantic tags will make HTML5 more useful. Canvas+WEBGL and other technologies realize plug-in-free animation and image and graphics processing capabilities; local storage enables offline applications; websocket changes the pure pull model of http to realize data The dream of push; MathML, SVG, etc., support richer renders, etc. My current understanding of HTML5 is only at the superficial stage. I will read more HTML5 books in the future to gain more insights.

【Related recommendations】

1. HTML5 free video tutorial

2. The difference between H5 and traditional HTML

3. Detailed explanation of the example of implementing the camera function through H5

4. H5 code example for making a registration page

5. Teach you the basic methods of using H5 drawing

The above is the detailed content of Detailed explanation of the difference between H5 and HTML4. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn