HTML video tag
HTML <video> tag adds video in a page. Subtitles may also be added in a video. We write the address of the video in the src attribute of video.
<video src="files/Hummingbird.mp4" style="width:100%; height:100%;" controls>
</video>
</>
Tag omission
Both opening and closing tags are necessary for the video element.
Global Attributes
All the global attributes are applicable on the video element.
we can also add video in a page using source element. This method is useful when the same video of different types are used. In that case, if one browser does not support one video, then another type of the same video is played.
<video style="width:100%; height:100%;" controls>
<source src="files/Hummingbird.mp4" type="video/mp4">
<source src="files/Hummingbird.mkv" type="video/mkv">
</video>
Try</>
Next Previous
Was this article helpful?