HTML <video> Tag
<video src="http://www.htmlcodes.ws/resources/countdown.ogg" width="300" height="150" controls> <p>If you are reading this, it is because your browser does not support the HTML5 video element.</p> </video>
The above example demonstrates usage of the
<video> element allows you to embed videos or movies, and audio files with captions within your HTML documents.
The URL of the video file is provided in the
src attribute. You can also use the following attributes to determine the display and behavior of the video.
As well as the global HTML attributes, you can use the following attributes with the
- URL of the video file.
- How the element handles crossorigin requests.
- Poster frame to show prior to video playback.
- Hints how much buffering the media resource will likely need.
- Hint that the media resource can be started automatically when the page is loaded.
- Groups media elements together with an implicit MediaController.
- Whether the video should loop (i.e. play continously, going back to the start each time it reaches the end).
- Whether to mute the sound by default.
- Show user agent controls (enables the user to do things like change the volume, pause, etc).
- Horizontal dimension.
- Vertical dimension.
Also see the <track> element for providing subtitles or other text tracks.