Embedding video in HTML 5
With HTML 5 on its way learn how to make use of the new video embed syntax in this HTML 5 tutorial
With HTML 5 on its way learn how to make use of the new video embed syntax in this HTML 5 tutorial
HTML5 is really starting to grab the attention of quite a few web designers and developers now as information about its streamlined syntax and new elements spread across the web. HTML 5 is supposed to be the next step in terms of HTML web page markup. It seems to have ditched the XHTML approach and is now veering back onto the original HTML path with this upcoming replacement.
Whilst HTML 5 will support a large number of the tags found in both HTML 4 and XHTML (mainly for compatibility and to make sure that people can easily transition over) it does have some new ones.
One of the changes to HTML 5 is the way in which video can be embedded into a web page with very little effort. Currently with HTML 4 or XHTML putting a video into a web page usually takes at least 2 or 3 lines of code.
With HTML 5 however the code for embedding videos into web pages will look like this.
<video width="500" height="400" src="myvideo.mp4">
And that’s all there is to it. Just look at how simple that is compared to the mess of code we’re currently used to. I don’t know about you but I’m quite looking forward to the days of HTML 5 being mainstream – the sooner the better as far as I’m concerned.
Right now though support for HTML 5 is very (very) limited as it has not been made available in all browsers. It’s safe to say though that most of the major browsers which use the Webkit rendering engine have got HTML 5 built into them however their level of compatibility and completeness vary. Currently Safari is likely to be one of the best supporting browsers for HTML 5 right now with support for Firefox, Opera and Chrome likely on its way.