HTML5 and HTML4 The Difference technology blog

Source: Internet
Author: User

HTML5 and the HTML4 The difference: HTML5 explanation of the use of new tags (partial)

1 , <audio> tags

<audio> tags define sounds, such as music or other audio streams.

HTML5: <audio src= "Someaudio.wav" > your browser does not support audio tags. </audio>

HTML4: <object type= "Application/ogg" Data= "someaudio.wav" ><param name= "src" value= "someaudio.wav" >< /object>

2 , <canvas> tags

<canvas> tags define graphs, tables and other images. This HTML element is designed for client-side vector graphics, and it does not behave itself, but it presents a drawing API to client-side JavaScript so that the script can draw everything it wants to draw onto a canvas.

HTML5: <canvas id= "MyCanvas" width= "$" height= "></canvas>"

HTML4: <object data= "Inc/hdr.svg" type= "Image/svg+xml" width= "$" height= "></object>"

3 , <footer> tags

The <footer> tag defines the footer for section or document. It contains the creator's name, the date the document was created, and/or contact information.

HTML5: <footer></footer>

HTML4: <div></div>

4 ,

The

HTML5:

HTML4: <div></div>

5 , <section> tags

<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>

6 , <source> tags

<source> tags define media resources for media elements such as:<video> and <audio>.

HTML5: <source>

HTML4: <param>

7 , <summary> tags

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 the about HT ML 5.</details>

Html4:none

8 , <time> tags

The <time> tag defines the date or time, or both.

HTML5: <time></time>

HTML4: <span></span>

9 , <video> tags

<video> tags define videos, such as movie clips or other video streams.

HTML5: <video src= "Movie.ogg" controls= "Controls" > your browser does not support video tags. </video>

HTML4: <object type= "Video/ogg" Data= "MOVIE.OGV" ><param name= "src" value= "MOVIE.OGV" ></object>

HTML5 and HTML4 technology blog

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.