The src attribute on a <video> tag specifies the URL or path of a video file.
This attribute is an alternative to a <source> tag inside the video element.
A src attribute on a <video> element.
The attribute references an video file.
<video src="/media/movie.mp4" controls
width="320" height="240">
</video>
The src attribute specifies the URL of the video file.
This attribute is an alternative to placing a <source> tag inside the video element.
With a src attribute only one file can be specified, whereas <source> tags allows multiple files.
The URL can be internal (same website) or external (from another website).
<video src="URL" />
Value | Description |
---|---|
URL | URL or path to a video file. |
Here is when src support started for each browser:
Chrome
|
4.0 | Jan 2010 |
Firefox
|
3.5 | Jun 2009 |
IE/Edge
|
9.0 | Mar 2011 |
Opera
|
11.5 | May 2011 |
Safari
|
3.1 | Mar 2008 |
Back to <video>