new elements in HTML5

new elements in HTML5

The following lists the new elements of HTML5 and their descriptions.

new semantic/structure elements

The new elements provided by HTML5 can build a better document structure:

标签 描述
<article> Define articles within the document.
<aside> Define content outside the page content.
<bdi> Define the text direction that is different from other text.
<details> Define additional details that users can view or hide.
<dialog> Define dialog or window.
<figcaption> Define the title of the <figure> element.
<figure> Define self-contained content, such as illustrations, charts, photos, code lists, etc.
<footer> Define the footer of the document or section.
<header> Define the header of the document or section.
<main> Define the main content of the document.
<mark> Define important or emphasized content.
<menuitem> Define commands/menus that users can call from a popup menu.
<meter> Define scalar measurements within a known range (scale).
<nav> Define navigation links within the document.
<progress> Define task progress.
<rp> Define what to display in browsers that do not support ruby annotations.
<rt> Define the explanation/sound of the character (for East Asian fonts).
<ruby> Define ruby annotation (for East Asian fonts).
<section> Define the section in the document.
<summary> Define the visible title of the <details> element.
<time> Define date/time.
<wbr> Define possible line breaks (line-break).

阅读更多有关 HTML5 semantic的内容。

new form element

标签 描述
<datalist> Define the predefined options of the input control.
<keygen> Define the key pair generator field (for forms).
<output> Define the calculation result.

阅读更多有关 HTML Form Elementsnew, old and old elements.

new input type

new input type new input attribute
  • color
  • date
  • datetime
  • datetime-local
  • email
  • month
  • number
  • range
  • search
  • tel
  • time
  • url
  • week
  • autocomplete
  • autofocus
  • form
  • formaction
  • formenctype
  • formmethod
  • formnovalidate
  • formtarget
  • height at width
  • list
  • min 和 max
  • multiple
  • pattern (regexp)
  • placeholder
  • required
  • step

学习 HTML 输入类型中的所有新老输入类型。

学习 HTML Input Attributes中的所有输入属性。

HTML5 - 新的属性语法

HTML5 允许四种不同的属性语法。

该例演示 <input> 标签中使用的不同语法:

标签 描述
Empty <input type="text" value="Bill Gates" disabled>
Unquoted <input type="text" value=Bill>
Double-quoted <input type="text" value="Bill Gates">
Single-quoted <input type="text" value='Bill Gates'>

在 HTML5 中,根据属性所需,可能会使用所有这四种语法。

HTML5 图像

标签 描述
<canvas> 定义使用 JavaScript 的图像绘制。
<svg> 定义使用 SVG 的图像绘制。

阅读更多有关 HTML5 Canvas 的内容。

阅读更多有关 HTML5 SVG 的内容。

新的媒介元素

标签 描述
<audio> 定义声音或音乐内容。
<embed> 定义外部应用程序的容器(比如插件)。
<source> 定义 <video> 和 <audio> 的来源。
<track> 定义 <video> 和 <audio> 的轨道。
<video> 定义视频或影片内容。

阅读更多有关 HTML5 视频的内容。

阅读更多有关 HTML5 音频的内容。