Video Tag

Advertisements

Prev Tutorial Next Tutorial

Video Tag in HTML5

<video>tag are used to add video on web page. Html5 added new tag for add video files on web page, befor html5 it is achieve by using <embed> tag

Attributes of meter

  • mp4
  • webM
  • ogg

Browser supported

video formats
mp4YesYesYesNoYes
webMYesYesNoYesNo
oggYesYesNoYesNo

Example

	
<!DOCTYPE html>
<html>
<body>

<video controls>
<source src="/html5/images/movie.mp4" type="video/mp4">
</video>

</body>
</html>

Result

Attributes of Video Tag

AtrributeDescription
controlsUsed to defines the video controls which is displayed with play/pause buttons.
heightUsed to set the height of the video player.
widthUsed to set the width of the video player.
posterUsed to specifies the image which is displayed on the screen when the video is not played.
autoplayUsed to specifies that the video will start playing as soon as it is ready.
loopUsed to specifies that the video file will start over again, every time when it is completed.
mutedUsed to mute the video output.
preloadUsed to specifies the author view to upload video file when the page loads.
srcUsed to specifies the source URL of the video file.

Html Video Tag media type

File FormatMedia Type
MP4video/mp4
WebMvideo/webm
Oggvideo/ogg

Browser supported

Element
<video>YesYesYesYesYes

Prev Tutorial Next Tutorial

Google Advertisment

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 9999595223

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

For Projects 9999595223

Google Advertisements


Buy Websites 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs

Advertisements