Easy Tutorial
❮ Att Button Formmethod Tag Tr ❯

HTML Audio/Video DOM src Attribute

HTML Audio/Video DOM Reference Manual

Example

Change the source of the video:


Definition and Usage

The src attribute sets or returns the current source of the audio/video.


Browser Support

Internet Explorer 10, Firefox, Opera, Chrome, and Safari support the src attribute.

Note: Internet Explorer 9 and earlier versions do not support the src attribute.


Syntax

Set the src attribute:

Return the src attribute:

Attribute Values

Value Description
URL Specifies the URL of the audio/video source. Possible values: absolute URL - points to another website (e.g., src="http://www.example.com/movie.ogg")<br>relative URL - points to a file within the website (e.g., src="movie.ogg")

Technical Details

| Return Value: | String value, the current source of the audio/video. | | --- | --- |

❮ Att Button Formmethod Tag Tr ❯