How to make HTML5 video with autoplay

HTML 5 introduced an element specifically for the playback of videos in the internet and specifically within HTML content which is the language that makes up most of the internet.

HTML 5 video was in part a replacement for the object element which was primarily used for the same purpose within older versions of HTML.

In HTML 5 it is now much easier to include video because the element mentioned above is specifically designed for that purpose and as such no third party objects need to be introduced.

Set the Autoplay option to make your video playing instantly after opening your site

Set the 'Autoplay' option to make your video playing instantly after opening your site

HTML 5 video autoplay

One of the great features of HTML 5 is the ability to make the video auto play when the website containing it first loads up.

The autoplay feature has actually been built in to HTML 5 video as an additional attribute – the inclusion of which causes the video mentioned in the element to play automatically.

An example of the code required to make a HTML 5 video automatically play is as follows:

<video controls autoplay>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
  Your browser does not support the video tag.

The above code will make a video automatically play when the webpage is loaded in the browser. You can change the name of the video to suit your media. There is also a default message included for display on browser that do not support HTML 5 (this will only be very old browsers and thus the message will not be shown often.

If you are interested in creating great HTML 5 auto play videos then check out EasyHTML5Video which is a fantastic tool for working with HTML 5 video and has loads of cool features.

Free Download


For troubleshooting, feature requests and general help contact us at Mail Support. Make sure to include details on your browser, operating system, Easy Html5 Video version, link to your page. In most cases you'll get a reply within 1 business day.