Home >Web Front-end >Front-end Q&A >How to use html source tag

How to use html source tag

青灯夜游
青灯夜游Original
2019-05-27 15:29:344569browse

The

source tag is a new tag in HTML 5; used to define media resources for media elements (such as video and audio). This tag allows you to specify alternative video/audio files for the browser to select based on its media type or codec support.

How to use html source tag

#How to use the html source tag?

The source tag is a new tag in HTML 5; used to define media resources for media elements (such as video and audio).

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: IE 8 or earlier versions of IE browsers do not support the tag.

html source tag example

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
</head>
<body>
<audio controls>
  <source src="https://img.php.cn/ueditor/php/upload/file/20190323/1553324890593240.ogg" >
  <source src="https://img.php.cn/ueditor/php/upload/file/20190323/1553324890628612.mp3" >
您的浏览器不支持 audio 元素。
</audio>
</body>
</html>

Rendering:

How to use html source tag

The above is the detailed content of How to use html 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