HTML 5 is a new network standard, with the goal of replacing the existing HTML 4.01, XHTML 1.0 and DOM Level 2 HTML standards. This article introduces you to a detailed explanation of how to use HTML5 tags. Friends who are interested in using HTML5 tags will learn together.
HTML 5 is a new network standard with the goal of replacing the existing HTML 4.01, XHTML 1.0 and DOM Level 2 HTML standards. It hopes to reduce the browser's need for plug-in-based rich internet application (RIA) that requires plug-in, such as Adobe Flash, Microsoft Silverlight, and Sun JavaFX.
HTML 5 provides some new elements and attributes that reflect typical modern usage websites. Some of them are technically similar to the <div> and <span> tags, but have some meanings, such as <nav> (website navigation block) and <footer>. This tag will be conducive to search engine indexing, small screen devices and visually impaired people. It also provides new features for other browsing elements through a standard interface such as <audio> and <video> tags.
HTML 5, as a new generation of hypertext markup language, has added many tags. These tags are not only semantic, but also powerful. The following tags are:
<article> Defines external content. For example, a new article from an external news provider, either from a blog, or from a forum. Or it comes from other external sources.
<aside> defines content outside the page content, but should be related to the page content
<audio> Define sounds, such as music or other audio streams
<canvas> Defines graphics, such as charts and other images.
<command> Defines command buttons, such as radio buttons, check boxes, or buttons.
<datatemplate> A container that defines the data template. This element must have a child element that defines the template: <rule> element
<datagrid> defines a list of optional data. datagrid is displayed as a tree list
<datalist> Defines a list of optional data. Used with the input element to create a drop-down list of input values
<dialog> Define a conversation, such as a conversation
<embed> defines embedded content, such as plug-ins
<event-source> Defines the source of events sent by the server
<figure> Defines the grouping of media contents, and their titles
<footer> defines the footer of section or document
<header> defines the header of the section or document
<hgroup> Group titles
<keygen> defines the generated key
<m> Define text with tokens
The main function of <mark> is to highlight text on the page that needs to visually highlight its importance to the user. A typical application is to highlight search keywords to users in search results
<meter> defines the measure in units. Only used for metrics with known maximum and minimum values
<nav> Define navigation link
<nest> Define nested points for child elements in the data template. Use with <datatemplate> and <rule> elements
<output> Define different types of output, such as the output of a script
<progress> A running process. Can be used to display the progress of time-consuming functions in JavaScript or downloading
<rule> Defines rules for updating data templates. Use with <datatemplate> and <nest> elements
<rp> is used in ruby comments to define what is displayed by browsers that do not support ruby elements
<rt> Define the pinyin of a Chinese character or the Hiragana in Japanese Chinese characters
<ruby> Define annotated text in Asian languages
<section> Defines sections in the document. For example, chapters, headers, footers or other parts of a document
<source> defines a media resource for media elements such as <video> and <audio>
<summary> Defines a summary, the head of the detail. Not equivalent to summary attribute in table
<time> defines a date or time, or both
<video> Define videos, such as movie clips or other video streams
HTML5 adds many new tags, and also eliminates some tags:
<acronym> can be used instead of <abbr>
<applet> is no longer supported
<basefont> Use CSS instead
<big> Use CSS instead
<center> Use CSS instead
<dir> Use CSS instead
<font> Use CSS instead
<frame> is no longer supported
<frameset> is no longer supported
<noframes> is no longer supported
<s> Use CSS instead
<small> Use CSS instead
<strike> Use CSS instead
<tt> Use CSS instead
<u> Use CSS instead
The above tags are not recommended in XHTML 1.0, but they are still supported, but are completely unsupported in HTML 5. In addition, many tag attributes are not supported, such as aling, etc.