Good web front-end programmer Share What is the difference between HTML5 and HTML?

  Good web front-end programmer Share What is the difference between HTML5 and HTML? Many students did not learn HTML5 front of the large, I do not understand for HTML5, often questioned: HTML5 traditional HTML What is the difference today, for everyone to talk about a few more obvious difference between the two?. First of all, HTML5 has gone far beyond the scope of Markup Language, which is designed to support multimedia on mobile devices, and HTML than up, the depth and breadth have been further improved.

  Next, we look at both declared file type:

  HTML:1、<!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01//EN"

  "http://www.w3.org/TR/html4/strict.dtd">;

  2、<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Strict//EN"

  3、"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">;

  HTML5:<!DOCTYPEhtml>

  Can be seen from the above, in a statement on the document, the statement HTML code is very long and complex, and HTML5 statement more simple, easy to remember, so HTML5 is more conducive to speed reading than HTML programmers and developers.

  In addition, both the semantic structure are different. HTML is no semantic tag structures, typically <divid = "header"> </ div> named, HTML5 increased many semantic tags, such as: <header>, <nav>, <article>, <aside >, <footer>, so that the code structure clearer, more readable.

  HTML5 adds powerful graphics capabilities, by drawing capabilities, coupled with JS animation and pictures can be achieved. The HTML4.0 does not. In HTML5, Canvas, and SVG can be plotted, the Canvas is equivalent to a canvas, can draw 2D graphics by JavaScript, Canvas is performed pixel by pixel rendering. SVG is scalable vector graphics, vector-based network for defining graphics, SVG strict compliance with XML syntax, which is readable and easy to modify the image file and editing can be searched, indexed, scripted or compression. It can be high-quality printing at any resolution.

  In addition to the above points, also added a powerful HTML5 video tag. HTML4.0 This function is not available, insert video code with the need for a long HTML4.0, but you only need to use HTML5 video tag can be.

  To today, HTML5 functionality has been very strong, look to the future, the development potential of HTML5 unlimited.

Guess you like

Origin blog.51cto.com/14573321/2446422