HTML CSS examples for HTML Tag:audio
The src attribute specifies the location URL of the audio file.
To make it work in all browsers - use <source> elements inside the <audio> element.
<source> elements can link to different audio files. The browser will use the first recognized format:
<!DOCTYPE html> <html> <body> <audio controls> <source src="your.ogg" type="audio/ogg"> <source src="your.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio><!--from w w w . ja va 2 s .c om--> </body> </html>
Value | Description |
---|---|
URL | The URL of the audio file. |
<!DOCTYPE html> <html> <body> <audio src="your.ogg" controls> Your browser does not support the audio element. </audio><!--from w ww . j av a 2 s . c om--> </body> </html>