how to play video file in html

0 votes
51 views
asked Jan 3, 2013 in HTML by Chanakya (545 points)
is there any way to play video file in html?

1 Answer

0 votes
answered Jan 3, 2013 by anonymous

this is the code to play a video

<video width="320" height="240" controls>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
  <source src="movie.webm" type="video/webm">
  <object data="movie.mp4" width="320" height="240">
    <embed src="movie.swf" width="320" height="240">
  </object> 
</video>

 

using the html5<video>Element

<video width="320" height="240" controls>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
  <source src="movie.webm" type="video/webm">
Your browser does not support the video tag.
</video>

...