HTML Video


HTML Video

HTML video is used to place video within HTML documents.

Videos can be placed within HTML pages using the following method:

HTML Video <embed>

The HTML 5 <embed> tag is used to embed an external application or content.

The following code will embed a Flash video into a web page. However, if the browser doesn’t support Flash, it cannot be viewed. In addition, Apple devices, including the iPad and iPhone, do not support Flash.

<embed height="100" width="100" src="flash.swf">


HTML 5 <video> Element

The HTML 5 <video> tag specifies video within an HTML document, including videos and movies.

It is compatible with all newer web browsers.


The HTML code will look something like this:

<video controls width="640" height="260">
<source src="video.mp4" type="video/mp4">
<source src="video.ogv" type="video/ogv">
Your browser does not support video.

The above example includes an mp4 file for newer browsers, an OGG file for some older browsers and a text notification for browsers that can’t play either file.

Although using the HTML 5 element with the embed element is the best option, it does require additional steps, as you must convert the video file into different formats. In addition, the <embed> element cannot display an error message if the file cannot be played.

HTML Video – Using A Hyperlink

Hyperlinks may be used to link to a video file within a web page. When clicked on, most web browsers will launch an application to enable the file to play.

The HTML code will look something like this:

<a href="video.swf">Play the Video</a>

YouTube – A Quick and Easy Solution

If you’re looking for an easy solution for displaying video within your web page, you may want to consider using Simply visit the site, upload your video and copy the code they supply into your web page to display your video.


This concludes the HTML Video section. For additional information, visit the HTML Layouts section.