HTML (Hypertext Markup Language) Video is a way to embed videos on web pages using HTML code. It allows you to include videos on your website, making it more engaging and dynamic. HTML video is supported by most modern web browsers, including Google Chrome, Firefox, Safari, and Microsoft Edge.
To embed a video in HTML, you first need to create a video element using the <video> tag. Here’s an example:
<video width="640" height="360" controls>
<source src="video.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
In this example, the video element has a width of 640 pixels and a height of 360 pixels. The “controls” attribute adds video playback controls (like a play/pause button, a volume control, and a timeline) to the video player.
The <source> tag is used to specify the location of the video file and its file type. In this case, the video file is called “video.mp4” and its file type is MP4.
The text “Your browser does not support the video tag.” is displayed if the user’s browser does not support HTML video.
You can add multiple <source> tags to specify different video formats (e.g. MP4, WebM, Ogg) and the browser will choose the first one it can play.
Overall, using HTML video is a simple and effective way to add video content to your website.
