Articles → HTML 5 → Video tag in HTML5

Video tag in HTML5






Purpose





Syntax


<video controls or autoplay>
	<source src=" " type=" " />
	<source src=" " type=" " />
</video>













Example




<!DOCTYPE html>
<html lang="en">
	<head>
		<title></title>
	</head>
	<body>
		<video controls>
			<source src="test.mp4" type="video/mp4" />
		</video>
	</body>
</html>




Picture showing the output of video tag in html5

Click to Enlarge


Browser support


BrowserMP4WebMOgg
Internet ExplorerYESNONO
ChromeYESYESYES
FirefoxYESYESYES
SafariYESNONO
OperaYES (from Opera 25)YESYES



Posted By  -  Karan Gupta
 
Posted On  -  Sunday, November 26, 2017

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250