Home > Web Front-end > HTML Tutorial > What does the source tag do?

What does the source tag do?

云罗郡主
Release: 2019-02-18 10:34:11
Original
6064 people have browsed it

What is the function of the source tag?

html source tag syntax

Function: for media elements (such as

Description: The tag allows you to specify alternative video/audio files for the browser to select based on its media type or codec support.

Note: The tag is a new tag in HTML 5.

html source tag example

<!DOCTYPE html>
<html>
<body>
<audio controls>
<source src="http://www.php.cn/i/horse.ogg" type="audio/ogg">
<source src="http://www.php.cn/i/horse.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
</body>
</html>
Copy after login


The above is the detailed content of What does the source tag do?. 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