Posts in current category

HTML5 new element


May 03, 2021 12:37 HTML5


Table of contents


HTML5 new element

With the update iteration of the HTML version, there are many elements that are changing, and this section will cover some of the new elements in HTML5!

HTML5 new element

HTML 4.01 has changed a lot since 1999, and today, several of the elements in HTML 4.01 have been discarded and these elements have been removed or redefined in HTML5.

In order to better handle today's Internet applications, HTML5 adds many new elements and functions, such as: graphics drawing, multimedia content, better page structure, better form processing, and several api drag-and-drop elements, positioning, including web application cache, storage, network workers, etc.


New elements

标签 描述
<canvas> 标签定义图形,比如图表和其他图像。该标签基于 JavaScript 的绘图 API


New multimedia elements

Label Describe
<audio> Define audio content
<video> Define video (video or movie)
<source> Defining multimedia resources .
<embed> Define embedded content, such as plug-ins.
<track> Specify external text tracks for media such as the .lt;video> and the .lt;audio> elements.


The new form element

Label Describe
<datalist> Define a list of options. Use the input element with the input element to define the possible values for the input.
<keygen> Specifies the key pair generator field used for the form.
<output> Define different types of output, such as the output of a script.

Tip: You can view the form elements used by the full HTML in the HTML Forms section of this site!



New semantic and structural elements

HTML5 provides new elements to create a better page structure:

标签 描述
<article> 定义页面独立的内容区域。
<aside> 定义页面的侧边栏内容。
<bdi> 允许您设置一段文本,使其脱离其父元素的文本方向设置。
<command> 定义命令按钮,比如单选按钮、复选框或按钮
<details> 用于描述文档或文档某个部分的细节
<dialog> 定义对话框,比如提示框
<summary> 标签包含 details 元素的标题
<figure> 规定独立的流内容(图像、图表、照片、代码等等)。
<figcaption> 定义 <figure> 元素的标题
<footer> 定义 section 或 document 的页脚。
<header> 定义了文档的头部区域
<mark> 定义带有记号的文本。
<meter> 定义度量衡。仅用于已知最大和最小值的度量。
<nav> 定义导航链接的部分。
<progress> 定义任何类型的任务的进度。
<ruby> 定义 ruby 注释(中文注音或字符)。
<rt> 定义字符(中文注音或字符)的解释或发音。
<rp> 在 ruby 注释中使用,定义不支持 ruby 元素的浏览器所显示的内容。
<section> 定义文档中的节(section、区段)。
<time> 定义日期或时间。
<wbr> 规定在文本中的何处适合添加换行符。


The removed element

The following HTML 4.01 elements have been removed in HTML5:

  • <acronym>
  • <applet>
  • <basefont>
  • <big>
  • <center>
  • <dir>
  • <font>
  • <frame>
  • <frameset>
  • <noframes>
  • <strike>
  • <tt>