HTML and video and src properties
The src property is used to place the path source of the video you need to play, as follows:
Play a video:
Your browser does not support the video tag.
</video>
Try it out . . .
Browser support
Src properties are supported by all major browsers. However, the defined file format is not supported by all browsers.
Note: Internet Explorer 8 and earlier versions of IE do not support the label.
Definitions and usages
The src property specifies the local path (URL) of the video file.
The above example uses the Ogg file, which works well on Firefox, Opera, and Chrome.
If you need to play videos on Internet Explorer and Safari, you must use an MPEG4 file.
If you want to play a video file in all browsers - you can use the total use of the element in the .lt;source?gt; element. E lements can be linked to different video files. The browser will use the first recognizable format:
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
Try it out . . .
The difference between HTML 4.01 and HTML5
The label is a new HTML5 label.
Grammar
The property value
value | describe |
---|---|
URL |
The URL of the video file. Possible value:
|
HTML and video. Tags
Related articles
HTML DOM Reference Manual: HTML DOM Video src property