Using the video Element

The video element embeds video content into a web page.

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

The attributes for the video Element

AttributeDescription
autoplayIf present, the browser starts playing the video as soon as the video is available.
preloadwhether or not to load the video in advance.
controlswhether to display controls.
loopwhether to repeat the video.
posteran image to display when the video data is being loaded.
heightthe height of the video.
widththe width of the video.
mutedwhether to mute the video.
srcwhere is the video from.
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: