Book
Media
Media
- Images
- Audio
- Video
Video
Video is another new feature of HTML5.
<video>
tag is used to show our video in the web page.
Handling video is very similar to audio.
A src
attribute will be needed to state the url
of our video.
Similar with audio, we can use <controls>
attribute to display the playback bar and <source>
element to place alternative formats of our video.
The video formats that are supported on HTML5 are:
.mp4
, .webm
and .ogg
.
Currently only Chrome, Firefox and Opera support all these formats.
Example:
<video controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
For more information: https://www.w3schools.com/html/html5_video.asp