【Front end tutorial】JS h5

Javascript h5

HTML5 (h5 often heard for short) is a new specification for HTML in the web. It has made some improvements to HTML 4.01 and provided some new technologies.

For the development history of HTML, not to mention here

What new web technologies were introduced in HTML5

Document type description changes

1
<!doctype html>

This is the latest HTML5 document type description statement

Discard some old HTML elements and introduce new HTML elements

Removed obsolete HTM elements such as

1
2
3
4
<big> </big>
<center> </center>
<font> </font>
...

and many more

Introduced some new HTML elements, these elements have characteristics such as semantics, such as

1
2
3
4
5
<article> </article>
<header> </header>
<section> </section>
<footer> </footer>
...

And many other new label elements

Multimedia tags

Note: The mp4 playback media comes from the Tencent QQ music client, which is only used for testing the program code, and has no other purpose.

The source code is as follows:

1
2
3
4
<video width="100%" height="240" controls>
  <source src="/video/music.mp4" type="video/mp4">
  Browser does not support video tag
</video>

Note: The mp4 playback media comes from the Tencent QQ music client, which is only used for testing the program code, and has no other purpose.

The source code is as follows:

1
2
3
4
<audio width="100%" controls>
  <source src="/video/music.mp4" type="audio/mpeg">
  Browser does not support audio element
</audio>

2D / 3D images

Canvas draw some images

Of course, WebGL can also draw 3D graphics on the canvas element

Offline storage

Application-level caching through manifests

Use address location targeting

Geolocaon object to use the current address location service

use multi-threading

Implementing JS background threads through Web Workers for complex calculations and affecting transactions allowed by the main thread

other

And camera api etc.

Persist in original technology sharing, your support will encourage me to continue to create!