Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest self-service freelancing marketplace for people like you.

HTML <video> src Attribute

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.

Example

#

A src attribute on a <video> element.
The attribute references an video file.

<video src="/media/movie.mp4" controls
       width="320" height="240">
</video>

Using src

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


Syntax

<video src="URL" />

Values

#

Value Description
URL URL or path to a video file.

Browser support

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

You may also like

 Back to <video>
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest self-service freelancing marketplace for people like you.

Guides