HTML5 Zone is brought to you in partnership with:

Because I am constantly busy working on something, I have never had time to actually put everything in words and pictures. But, since you got here, then you must have already seen some part of my work - and this is the way I’m talking.I'm 23, born in Romania, student at UPG Romania in software development field. I started from 0, mostly with basic stuff, and I’m evolving every day to an expert. I'm focused on freelancing projects, from small websites, to really heavy stuff. I know that I look and act differently from most developers, but this is why you will love to work with me! Constantin has posted 42 posts at DZone. You can read more from them at their website. View Full User Profile

Introducing the HTML5 Video Element

07.30.2012
| 1928 views |
  • submit to reddit
Forget using the <iframe> element for sharing videos to your friends. There is an easier way to do this. Now, with HTML5 you can use the <video> element:
 <!DOCTYPE html>
<html>
<body>
<video width="448" height="336" controls="controls" poster="poster.jpg">
  <source src="Nole vs. Rafa.mp4" type="video/mp4" />
  <source src="Nole vs. Rafa.ogg" type="video/ogg" />
  Your browser does not support the video tag.
</video>
</body>
</html>
And the output will be:

  The <video> tag is supported in Internet Explorer 9 (earlier versions does not support the <video> element), Firefox, Opera, Chrome and Safari.
poster="poster.jpg" – specifies an image to be shown while the video is downloading, or until the user hits the play button
For more informations, please visit http://www.w3.org/TR/html5/the-video-element.html#the-video-element .
Published at DZone with permission of its author, Constantin Alin. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)