You are here : htmlHTML 5source

<source> - HTML 5

The <source> tag is used to specify multiple media resources for media elements, such as <video> and <audio>.

The <source> tag allows you to specify alternative video/audio files which the browser may choose from, based on its media type or codec support.


Syntax

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


Example

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


Output / Return Value


Limitations


Alternatives / See Also


Reference