HTML Video

Article Summary

Learn how to use the HTML video element with common attributes and multiple source formats.

The <video> element is used to embed video files in a web page.


Basic Video Example

<video 
  src="movie.mp4"
  controls
  width="600"
  height="340"
  poster="thumbnail.jpg">
</video>

Attributes Used

  • src → video file path
  • controls → play controls
  • width / height → size
  • poster → preview image

Multiple Video Sources

<video controls>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.webm" type="video/webm">
</video>
Was this helpful?