HTML source type property
Examples
property type use:
<audio controls>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
您的浏览器不支持 audio 元素。
</audio>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
您的浏览器不支持 audio 元素。
</audio>
try it"
Browser Support
Internet Explorer 9 +, Firefox, Opera, Chrome and Safari support type attribute.
Note: 8 and earlier versions of Internet Explorer do not support the <source> tag.
Definition and Usage
type attribute specifies the MIME type of property.
Differences between HTML 4.01 and HTML5
<Source> tag is new in HTML5 tags.
grammar
<source type="MIME_type">
Property Value
值 | 描述 |
---|---|
MIME_type | 规定媒体资源的 MIME 类型。 常见的 MIME 类型: 视频:
|
HTML <source> tag