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

Detailed explanation of HTML5 source tag

小云云
Release: 2018-01-31 11:19:16
Original
3805 people have browsed it

HTML5 source tag is a media element (such as

Tag attribute:

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

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>
Copy after login

Output:

HTML Differences between 4.01 and HTML 5

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

Related labels:
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