Embedding multimedia (audio and video files on web page in HTML)

Introduction to multimedia in HTML

Well managed audio and video can bring your web pages to life and poorly managed audio and video can take your audience away. The first step to add audio and video in your web page is to create the source files or gather prerecorded source files.

The easiest way to add video or sound to your web site is to include the special HTML tag called <embed>. This tag causes the browser itself to include controls for the multimedia automatically provided browser supports <embed> tag and given media type.

Embedding multimedia (audio and video files on web page in HTML)

Adding audio and video to a web page

You can place an access web based audio and video in two ways that will be read across the browsers: the anchor tag <a> and <embed> tag.

Using an anchor tag <a></a> is the same as placing any link within an HTML document.

If you use this method, your users will either save the file to their desktops, launch a plugin application.

If you want the video to appear on the same page as the rest of the content, you will want to embed the clip in the page by using <embed> tag. Use of <embed> is similar to the use of <img> tag. However, the <embed> tag requires usera to have the appropriate plug-in installed.

Embedding multimedia (audio and video files on web page in HTML)

Attributes of <embed> tag

Height in pixels or percent

Unless you need your movie to scale then, set this in pixels according to how big your movie is.

Width in pixels or percent

Width is best controlled by setting in pixels, but still you can use percentage also to describe how much space within the browser frame you want to embed.


It can be true or false, your movie starts when the page is first first accessed. If it is set as false then user has to click to play.


This adds user control to the movie. If you set this as true, you will want to know how many pixels your controller needs for the display and then add that amount to the height of your movie. Otherwise, the movie and the controller will be forced into the space required for the movie.


If you want the movie to play over and over, set this to true. If you want to play it once and stop, set it to false.

Let us play a sample file using <embed> tag

<title>Video example</title>
<embed src="C:\Users\VIjay Kumar\Downloads\640.wmv" width=400 height=400 controller=true autoplay=true>
embeding video in HTML, www.programmingtutorial.in