<video> element – video or a movie

Usage: typically used to include a video/ movie on a web page. Since different browsers support a specific video codec, one typically includes reference to multiple codecs (along with some type of fallback – such as Flash or ability to download the video file and play in a native media player).

Permitted Content: typically contains a <source> element and zero or more <track> elements.

Tag omission: both start and end tag must be present.

Example code:

<video src=”July_04_2010.ogv” controls=”controls”>
Your browser does not support the video element.

Example page (opens in a new tab/ window – view source code):

Default display properties: typically transparent (controls will show).

Common Attributes:

  • audio=”muted” – one example of choices (in this case, override viewer preference)
  • autoplay=”autoplay” – automatically begin playback of video stream as soon as possible.
  • controls=”controls” – expose user interface to controlĀ  playback of video stream.
  • height=”pixels” – height of movie in pixels
  • loop=”loop” – return to the art of the audio stream after reaching the end of the video stream.
  • poster=”url” – address of an image file to show while no video content is available
  • preload=”none/metadata/auto” – identify whether optimistic downloading of video stream is worthwhile
  • src= location of video stream
  • width=”pixels” – width of video in pixels

Permitted Parent Elements: any element which can contain phrasing or flow elements.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.