<video> Tag Attributes

Attributes of the <video> tag
global attributes In addition to the personal attributes of the <video> tag below, any of the common HTML attributes can also be coded.
width, height
src

a URI reference that resolves to the URL of the video resource

Use percent escape codes as explained in the URL Encoding Tutorial for any special characters in the URI reference.

If the value of the src attribute is an HTTP URL, it may contain any of the following components:

  1. protocol scheme, typically http: or else https:
  2. username, followed by an "@"
  3. host name or IP address
  4. port number, which defaults to 80 for the http scheme and 443 for the https scheme
  5. absolute or relative path
  6. search query, indicated by "?"

If the protocol scheme, username, host name/IP address and port number are omitted the default is the current host - the same server as the base of the current document. If the path starts with a slash /..., it is an absolute path from the document root directory (AKA "web root") on the server. A relative path will be resolved relative to the base of the current document.

poster

a URI reference that resolves to the URL of a two-dimensional image resource

The poster is displayed as a preview of the video when the video is not being played.

Use percent escape codes as explained in the URL-encoding tutorial for any special characters in the URI reference.

If the value of the poster attribute resolves to an HTTP URL, it may contain any of the following components:

  1. protocol scheme, typically http: or else https:
  2. username, followed by an "@"
  3. host name or IP address
  4. port number, which defaults to 80 for the http scheme and 443 for the https scheme
  5. absolute or relative path
  6. search query, indicated by "?"

If the protocol scheme, username, host name/IP address and port number are omitted the default is the current host - the same server as the base of the current document. If the path starts with a slash /..., it is an absolute path from the document root directory (AKA "web root") on the server. A relative path will be resolved relative to the base of the current document.

autoplay="autoplay"
controls="controls"
loop="loop"
preload="none"
preload="metadata"
preload="auto"
HTML Media Events
oncanplay
oncanplaythrough
onemptied
onended
onerror
onloadeddata
onloadedmetadata
onloadstart
onpause
onplaying
onprogress
onratechange
onreadystatechange
onseeked
onseeking
onstalled
onsuspend
ontimeupdate
onvolumechange
onwaiting