Specifying the Video Source (and Format)

The src attribute specifies the URL for the video file.

 
<!DOCTYPE HTML>
<html>
<head>
<title>Example</title>
</head>
<body>
      <video src="yourVideo.webm" controls width="360" height="240">
            Video cannot be displayed
      </video>
</body>
</html>
  
Click to view this demo.

The following tabls lists video formats with significant browser support

FormatDescriptionSupport
WebMbacked by GoogleOpera Chrome Firefox
Ogg/TheoraOgg Theora is an open, royalty-free, and patent-free format.Opera Chrome Firefox
MP4/H.264free to use until 2015.Internet Explorer Chrome Safari
Home 
  HTML CSS Book 
    HTML  

video:
  1. Using the video Element
  2. Preloading the Video
  3. Displaying a Placeholder Image
  4. Setting the Video Size
  5. Specifying the Video Source (and Format)
  6. The source Element
  7. The track Element
Related: