📅  最后修改于: 2020-11-04 01:34:52             🧑  作者: Mango
HTML5比HTML4更完整,更容易,它具有许多新标签,例如
HTML被称为万维网的主要语言。 HTML会随时间进行许多更新,最新的HTML版本是HTML5。两种版本之间存在一些差异:
Features | Html | Html5 |
---|---|---|
definition | A hypertext markup language (HTML) is the primary language for developing web pages. | HTML5 is a new version of HTML with new functionalities with markup language with Internet technologies. |
Multimedia support | Language in HTML does not have support for video and audio. | HTML5 supports both video and audio. |
Storage | The HTML browser uses cache memory as temporary storage. | HTML5 has the storage options like:application cache, SQL database, and web storage. |
Browser compatibility | HTML is compatible with almost all browsers because it has been present for a long time, and the browser made modifications to support all the features. | In HTML5, we have many new tags, elements, and some tags that have been removed/modified, so only some browsers are fully compatible with HTML5. |
Graphics support | In HTML, vector graphics are possible with tools LikeSilver light, Adobe Flash, VML, etc. | In HTML5, vector graphics are supported by default. |
Threading | In HTML, the browser interface and JavaScript running in the same thread. | The HTML5 has the JavaScript Web Worker API, which allows the browser interface to run in multiple threads. |
Storage | Uses cookies to store data. | Uses local storage instead of cookies |
Vector and Graphics | Vector graphics are possible with the help of technologies like VML, Silverlight, Flash,etc. | Vector graphics is an integral part of HTML5, SVG and canvas. |
Shapes | It is not possible to create shapes like circles, rectangles, triangles. | We can draw shapes like circles, rectangles, triangles. |
Doc type | Doctype declaration in html is too long |
The DOCTYPE declaration in html5 is very simple “ |
Character Encoding | Character encoding in HTML is too long. |
Character encoding declaration is simple |
Multimedia support | Audio and video are not the part of HTML4. | Audio and video are essential parts of HTML5,like: . |
Vector Graphics | In HTML4, vector graphics are possible with the help of techniques like VML, Silver light and Flash. | Vector graphics are an integral part of HTML5, SVG, and canvas. |
Html5 uses cookies. | It supplies local storage in place of cookies. | |
Shapes | It is not possible to draw shapes like circles, rectangles, triangles. | Using html5, you can draw shapes like circles, rectangles, triangles. |
Browser Support | Works with all older browsers | A new browser supports this. |