html
  1. html-video

HTML Video Tag

The HTML <video> tag is used to embed video into a web page

It allows you to play videos on your web page without the need for a third-party plugin

How to Use the Video Tag in HTML

Here is an example of how to create a video element in HTML:

<video width="320" height="240" controls>
  <source src="video.webm" type="video/mp4">
  Your browser might not support the video tag.
</video>
Try Playground

The width and height attributes specify the size of the video element in pixels.

The controls attribute adds playback controls to the video element.

The <source> element specifies the URL of the video file and its MIME type.

The text "Your browser does not support the video tag." is displayed if the browser does not support the video tag

Importance of the Video Tag

  • The <video> tag can be used to play videos on a web page without the need for a third-party plugin.
  • The <video> tag can help to improve the user experience of a web page.
  • Search engines use the <video> tag to index the structure and content of web pages.
Published on: