English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The src attribute specifies the URL of the media file to be played, this attribute is required when using <source> in <audio> and <video>.
An audio player with two source files. The browser should choose to support the following files (if available):
<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>Test to see ‹/›
IEFirefoxOperaChromeSafari
Internet Explorer 9+、Firefox、Opera、Chrome and Safari support the src attribute.
Note:Internet Explorer 8 and earlier versions do not support the <source> tag.
The src attribute specifies the URL of the media file to be played.
This attribute is required when using <source> in <audio> and <video>.
<source> tag is an HTML5 new tag.
<source src="URL">
Value | Description |
---|---|
URL | Specifies the URL of the media file. Possible values: Absolute URL-Points to another website (for example href =“ http://www.example.com/horse.ogg”) Relative URL-Points to a file within the website (for example href =“ horse.ogg”) |