Home  >  Article  >  Web Front-end  >  Detailed explanation of HTML5 source tag

Detailed explanation of HTML5 source tag

小云云
小云云Original
2018-01-31 11:19:163718browse

HTML5 source tag is a media element (such as 39000f942b2545a5315c57fa3276f220 and b97864c2e0ef2353a16c4d64c7734e92) that defines media resources. The e02da388656c3265154666b7c71a8ddc tag allows you to specify alternative video/audio files for the browser to select based on its media type or codec support. Here we mainly talk about the application attributes and examples of the source tag.

e02da388656c3265154666b7c71a8ddcTag attribute:

##AttributeValuemediamedia querySpecifies the type of media resource. srcurlSpecifies the URL of the media file. typenumeric valueSpecifies the MIME type of the media resource.

e02da388656c3265154666b7c71a8ddc tag supports global attributes and event attributes in HTML.

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

Output:

HTML Differences between 4.01 and HTML 5

Thee02da388656c3265154666b7c71a8ddc tag is new in HTML 5.

Related recommendations:

Detailed explanation of source command in MySQL database

MySQL database source command detailed explanation_MsSql

Detailed explanation of the use of source command under Linux

Description

The above is the detailed content of Detailed explanation of HTML5 source tag. For more information, please follow other related articles on the PHP Chinese website!

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