twitter rss feed

html5 laboratory

The <video> element

Description

This element defines video content within a HTML document.

Tags

This element must have a start and an end tag

Attributes

This element accepts the standard set of common attributes. But also the following:

Attribute Description
autoplay a boolean indicating whether the video should be played automatically
controls a boolean indicating that the default media controls should be displayed by the browser
height The height of the video in CSS pixels
loop a boolean indicating whether the video should be played repeatedly
poster the URL to an image file to be displayed when no video data is available
preload
  • none – indicates that the video is not to be preloaded (as it probably won't be required)
  • metadata – the video is probably not going to be required but it's metadata (e.g. dimensions, duration) is desirable
  • auto – informs the browser to attempt to download the entire video
  • (empty string) – means the same as auto
width The width of the video in CSS pixels
src a valid URL to the video file itself

Notes

  • This element cannot appear as a descendant of the <a> element
  • This element cannot appear as a descendant of the <button> element
  • This element can also contain a listing of <source> elements