HTML代表超文本标记语言。它用于使用标记语言设计网页。 HTML 是超文本和标记语言的结合。超文本定义了网页之间的链接。标记语言用于在定义网页结构的标签内定义文本文档。这种语言用于注释(在计算机注释处)文本,以便机器可以理解它并相应地处理文本。大多数标记(例如 HTML)语言都是人类可读的。该语言使用标签来定义必须对文本进行哪些操作。它用于构建和呈现网页上的内容。 HTML5 是 HTML 的第五个版本。许多元素从 HTML5 中删除或修改。
HTML 和 HTML5 之间存在许多差异,下面将讨论:
HTML | HTML5 |
---|---|
It didn’t support audio and video without the use of flash player support. | It supports audio and video controls with the use of |
It uses cookies to store temporary data. | It uses SQL databases and application cache to store offline data. |
Does not allow JavaScript to run in browser. | Allows JavaScript to run in background. This is possible due to JS Web worker API in HTML5. |
Vector graphics is possible in HTML with the help of various technologies such as VML, Silver-light, Flash, etc. | Vector graphics is additionally an integral a part of HTML5 like SVG and canvas. |
It does not allow drag and drop effects. | It allows drag and drop effects. |
Not possible to draw shapes like circle, rectangle, triangle etc. | HTML5 allows to draw shapes like circle, rectangle, triangle etc. |
It works with all old browsers. | It supported by all new browser like Firefox, Mozilla, Chrome, Safari, etc. |
Older version of HTML are less mobile-friendly. | HTML5 language is more mobile-friendly. |
Doctype declaration is too long and complicated. | Doctype declaration is quite simple and easy. |
Elements like nav, header were not present. | New element for web structure like nav, header, footer etc. |
Character encoding is long and complicated. | Character encoding is simple and easy. |
It is almost impossible to get true GeoLocation of user with the help of browser. | One can track the GeoLocation of a user easily by using JS GeoLocation API. |
It can not handle inaccurate syntax. | It is capable of handling inaccurate syntax. |
Attributes like charset, async and ping are absent in HTML. | Attributes of charset, async and ping are a part of HTML 5. |
有许多 HTML 元素已被修改或从 HTML5 中删除。其中一些如下所列:
Element | In HTML5 |
---|---|
Changed to | |
Changed to | |
Changed to |
|
Removed | |
Removed | |
Removed | |
No new tag. CSS is used for this | |
No new tag. CSS is used for this | |
No new tag. CSS is used for this | |
No new tag. CSS is used for this | |
No new tag. CSS is used for this | |
No new tag. CSS is used for this |
HTML5 中添加了许多新元素,例如导航、音频、figcaption、进度、命令、时间、数据列表、视频、图形、仪表、数据、部分、时间、旁白、画布、摘要、rp、rt、详细信息、wbr、标题、页脚、注册机、嵌入、文章、hgroup、bdi、标记、输出、源、轨道、部分、ruby 等等。
HTML 是网页的基础,用于通过构建网站和 Web 应用程序进行网页开发。您可以按照此 HTML 教程和 HTML 示例从头开始学习 HTML。