HTML5 video html code

The HTML5 <video> tag is the new multimedia kid in the block, and it’s gotten web developers all excited. A simple HTML5 video example should get you started. The new tag is simple to use and doesn’t take a lot of extra code like the <embed> tag does.

HTML5 Video Example - The New Multimedia Way

HTML5 is in the process of becoming the new HTML standard, used for creating web pages. One of the niceties of the new standard is that it allows you to natively embed videos on your website. This means that you don’t need to use third party plugins such as Adobe Flash, which costs money, to deliver video content to your visitors. You can do this in HTML5 using the new <video> tag, which is increasingly popular.


Here’s an HTML5 tag example that works on all modern browsers:

<video controls autoplay>
	<source src=”video.mp4” type=”video/mp4>
You can see that there is none of the gibberish here that you find in traditional tag URL’s, which makes it simpler for web developers.

Three formats

Unfortunately, no format has yet been set as the standard for delivering video in HTML, due to a variety of reasons. There are three formats today in the race to become the standard for HTML5:

  1. H.264
  2. OGG Theora
  3. WebM
Of these, OGG Theora and WebM are open source and they are completely royalty free. H.264 is a highly proprietary video format, which is used for MP4 video files. It also provides the best video quality of all the three formats. Web browsers such as Firefox, Google Chrome and Opera do not support the closed source H.264 format for HTML5 videos. They all support Theora and WebM

However, these two formats are not supported by Internet Explorer and Safari. They only support the H.264 format. If you want your videos to be viewed by all visitors on your website, you need to use at least two video formats on your web pages. One of them should be H.264 and the other can be one of the two open source free formats – Theora and WebM.

Example for multiple formats

Here’s an HTML5 video example of how a video tag with multiple formats will look.

<video controls autoplay>
	<source src=”myvideo.mp4” type=”video/mp4>
	<source src=”myvideo.ogv” type=”video/ogv>	
This is the best way to deliver HTML5 video that is compatible with all HTML5 compliant web browsers. You can also use the .webm format instead of .ogv in the above example, but the H.264 video file should always be there.

You can transcode all your videos for your website into various formats using HTML5 Video Format Converter. It provides convenience for all your conversion needs and makes your job very easy.

Download Convert Video to OGG Theora