The 5-Part Video Element

If you have your own video files, the video element allows you to add a functioning player to your website.

The 5 attributes the video element should include are:

  1. The tags themselves.
  2. The source attribute.
  3. A video poster.
  4. Width and height values.
  5. Other attributes that define how users interact with the media.

Note: As there are two ways to approach this, the following pages will showcase both:

Single-Source

Use this setup if you only have one version of the video file, like an MP4.

mp4 icon

movie.mp4

Multiple-Source

Use this setup if you have multiple versions of the video file, like MP4, WebM, OGG, etc.

mp4 icon

movie.mp4

webm icon

movie.webm

ogg icon

movie.ogg