English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The usage of <video> src attribute, the src attribute specifies the location of the video file (URL), to play video in Internet Explorer and Safari, we must use MPEG4file.
Play video online:
<video src="movie.ogg" controls> Your browser does not support the video tag. </video>Test to see ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the src attribute, but not all browsers support the defined file formats
Note: Internet Explorer 8 and earlier IE versions do not support the <video> tag.
The src attribute specifies the location of the video file (URL).
The above example uses Ogg files and will run on Firefox, Opera, and Chrome.
To play video in Internet Explorer and Safari, we must use MPEG4file.
To make it work on all browsers- Inside the <video> element <source> Elements. <source> Elements can link to different video files. Browsers will use the first recognizable format:
<video width="380" height="260" controls> <source src="movie.mp4" type="video/mp4"> <source src="movie.ogg" type="video/ogg"> Your browser does not support the video tag. </video>
<video> tag is part of HTML5 New tag.
<video src="URL">
Value | Description |
---|---|
URL | URL of the video file. Possible values:
|