HTML <source> type Attribute
The <source> element type attribute with <audio> element:
Example
<audio controls>
<source src="cat.mp3" type="audio/mpeg">
<source src="cat.ogg" type="audio/ogg">
Your browser does not support the audio tag.
</audio>
The <source> element type attribute with <video> element:
Example
<video controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.webm" type="video/webm">
Your browser does not support the audio tag.
</video>
Meaning
The type attribute is set to the MIME type of the linked media file specified by the src attribute.
It can also includes a codecs value to indicate how a media resource is encoded.
Standard Syntax
HTML: <source type="MIME-type">
XHTML: <source type="MIME-type" />
Advertisement