Home > Web Front-end > H5 Tutorial > body text

What is the use of html5 source type? Detailed introduction of html5 source tag

寻∝梦
Release: 2018-08-16 17:40:57
Original
7082 people have browsed it

html5 What is the use of source type? What are the contents of the html5 source tag? This article mainly describes the specific properties and usage of html5 source type, and also introduces the definition and application of html5 source tag in detail (with examples).

HTML5type attribute example:

Use type attribute:

<audio controls>
   <source src="horse.ogg" type="audio/ogg">
   <source src="horse.mp3" type="audio/mpeg">
 Your browser does not support the audio element.
</audio>
Copy after login
Copy after login
Copy after login

HTML5 Syntax of type attribute:

<source type="MIME_type">
Copy after login

HTML5Attribute value of type attribute:

What is the use of html5 source type? Detailed introduction of html5 source tag

##HTML5< ;source>type attribute definition and usage:

The type attribute specifies the MIME type of the media resource.

Differences between HTML 4.01 and HTML 5: The

tag is a new tag in HTML 5.

Browser support:

Internet Explorer 9, Firefox, Opera, Chrome and Safari support the type attribute.

Note: Internet Explorer 8 and earlier versions do not support the tag.

HTML5 tag example:

Audio player with two source files. The browser should select the files it supports (if any):

<audio controls>
   <source src="horse.ogg" type="audio/ogg">
   <source src="horse.mp3" type="audio/mpeg">
 Your browser does not support the audio element.
</audio>
Copy after login
Copy after login
Copy after login

HTML5 tag definition and usage:

tag Define media resources for media elements such as
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template