"HTML5"---"HTML5 provides some new label usage as well as the difference from HTML 4"

Source: Internet
Author: User

HTML 5 is a new network standard that aims to replace the existing HTML 4.01, XHTML 1.0 and DOM Level 2 HTML standards. It wants to reduce the browser's richness of Web application services (plug-in-based Rich Internet application,ria) that require plugins, such as Adobe Flash, Microsoft Silverlight, and Sun The needs of JavaFX.

HTML 5 provides a number of new elements and attributes that reflect a typical modern usage site. Some of them are technically similar <div> and <span> tagged, but have certain meanings, such as <nav> (site navigation blocks) and <footer> . This label will help search engine indexing, small screen devices and visually impaired use. It also provides new features for other browsing features through a standard interface, such as <audio> and <video> tagging.

Previous article: HTML5 shiv– let the Damned IE series Support HTML5 Bar introduced how to make all browsers support HTML5 tags, you can rest assured that the use of the bold!

Some outdated HTML 4 tags will be canceled, including those that are purely used as display effects, such as <font> and <center> , because they have been superseded by CSS. There are also some network behaviors through the DOM (via).

Let's take a look at some of the new tag usages provided by HTML 5 and the difference from HTML 4.

The <article> tag defines the external content. For example, a new article from an external news provider, or a text from a blog, or a text from a forum. or from other external source content.
HTML5:<article></article>
HTML4:<div></div>

The <aside> tag defines content other than article. The content of aside should be related to the content of article.
HTML5:<aside>Aside 的内容是独立的内容,但应与文档内容相关。</aside>
HTML4:<div>Aside 的内容是独立的内容,但应与文档内容相关。</div>

<audio> Tags define sounds, such as music or other audio streams.
HTML5:<audio src="someaudio.wav">您的浏览器不支持 audio 标签。</audio>
HTML4:<object type="application/ogg" data="someaudio.wav"><param name="src" value="someaudio.wav"></object>

<canvas> tags define graphs, tables and other images. This HTML element is designed for client-side vector graphics. It does not act on its own, but presents a drawing API to client JavaScript so that the script can draw everything it wants to draw onto a canvas.
HTML5:<canvas id="myCanvas" width="200" height="200"></canvas>
HTML4:<object data="inc/hdr.svg" type="image/svg+xml" width="200" height="200"></object>

<command> tags define command buttons, such as radio buttons, check boxes, or buttons.
HTML5: <command onclick=cut()" label="cut">
HTML4: none

<datalist> Tags define a list of optional data. In conjunction with the INPUT element, you can make a drop-down list of input values.
HTML5: <datalist></datalist>
HTML4: see combobox.

<details> Tag defines the details of the element, which the user can view or hide by clicking. Use with <legend> to make detail titles. The title is visible to the user and can be turned on or off when clicked on detail.
HTML5: <details></details>
HTML4: <dl style="display:hidden"></dl>

<embed> tags define embedded content, such as plugins.
HTML5: <embed src="horse.wav" />
HTML4: <object data="flash.swf"  type="application/x-shockwave-flash"></object>

The <figcaption> tag defines the caption of the figure element. The "figcaption" element should be placed in the position of the first or last child element of the "figure" element.
HTML5: <figure><figcaption>PRC</figcaption></figure>
HTML4: none

<figure> tags are used to group elements. Use the <figcaption> element to add a caption to an element group.
HTML5: <figure><figcaption>PRC</figcaption><p>The People‘s Republic of China was born in 1949...</p></figure>
HTML4: <dl>

The <footer> tag defines the footer for section or document. Typically, it contains the creator's name, the date the document was created, and/or contact information.
HTML5: <footer></footer>
HTML4: <div></div>

The tag defines the header of a section or document.
HTML5: 
HTML4: <div></div>

tags are used to group the titles of Web pages or sections (section).
HTML5: 
HTML4: <div></div>

The <keygen> tag defines the generated key.
HTML5: <keygen>
HTML4: none

<mark> is used primarily to visually present to users those words that need to be highlighted. A more typical application of <mark> tags is to highlight search keywords to users in search results.
HTML5: <mark></mark>
HTML4: <span></span>

<meter> tags define weights and measures. Measures that are used only for the known maximum and minimum values. The scope of the measure must be defined, either in the text of the element or in the Min/max property.
HTML5: <meter></meter>
HTML4: none

<nav> Tags define the part of the navigation link.
HTML5: <nav></nav>
HTML4:<ul></ul>

<output> tags define different types of output, such as the output of a script.
HTML5: <output></output>
HTML4: <span></span>

<progress> The process in which the tag is running. You can use the <progress> tag to display the process of time-consuming functions in JavaScript.
HTML5: <progress></progress>
HTML4: none

<rp> tags are used in ruby annotations to define what is displayed by browsers that do not support ruby elements.
HTML5: <ruby>漢 <rt><rp>(</rp>ㄏㄢˋ<rp>)</rp></rt></ruby>
HTML4: none

<rt> Tags define the interpretation or pronunciation of characters (Chinese phonetic symbols or characters).
HTML5: <ruby>漢 <rt> ㄏㄢˋ </rt></ruby>
HTML4: none

<ruby> tags define ruby annotations (Chinese phonetic notation or characters).
HTML5: <ruby>漢 <rt><rp>(</rp>ㄏㄢˋ<rp>)</rp></rt></ruby>
HTML4: none

<section> tags define the sections (section, section) in the document. such as chapters, headers, footers, or other parts of the document.
HTML5: <section></section>
HTML4: <div></div>

<source> Tags Define media resources for media elements such as <video> and <audio>.
HTML5: <source>
HTML4: <param>

The <summary> tag contains the title of the details element, which is used to describe the details of the document or document fragment. The "Summary" element should be the first child element of the "details" element.
HTML5: <details><summary>HTML 5</summary>This document teaches you everything you have to learn about HTML 5.</details>
HTML4: none

The <time> tag defines the date or time, or both.
HTML5: <time></time>
HTML4: <span></span>

<video> tags define videos, such as movie clips or other video streams.
HTML5: <video src="movie.ogg" controls="controls">您的浏览器不支持 video 标签。</video>
HTML4:<object type="video/ogg" data="movie.ogv"><param name="src" value="movie.ogv"></object>

Turn from here

"HTML5"---"HTML5 provides some new label usage as well as the difference from HTML 4"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.