How to add music or video to web page


Adding music/video to Web Page
 
Music / video can be added to a web page by simply using <embed> html tag. This tag indicates the browser   to include controls for the multimedia which automatically provides browser supports as soon as   <embed> tag is encountered .

Some of the attributes which can be used with <embed> tag are as follows:


Attribute Name
Function
align
Determines how to align the object. It can be set to either center, left or right.
autostart
This boolean attribute indicates if the media should start automatically. You can set it either true or false.
loop
Specifies if the sound should be played continuously (set loop to true), a certain number of times (a positive value) or not at all (false)
playcount
Specifies the number of times to play the sound. This is alternate option for loop if you are using IE.
hidden
Specifies if the multimedia object should be shown on the page. A false value means no and true values means yes.
Width
Width of the object (in pixels)
height
Height of the object (in pixels)
name
A name used to reference the object.
volume
Controls the volume.  Can be from 0 (off) to 100 (full volume).
src
URL of the object to be embedded


This is a simple program to illustrate the use of <embed > tag for adding music to a web page.

Code :


<!doctype html>
<html>
<head>
<title>Adding Music</title>
</head>
<body bgcolor="blue" align="center">
<center><H1><acronym> <u>Using embed Tag</u></acronym></H1></center>
<br />
<h2><center>This is a simple example to explain the use of embed tag in html.
<br />This tag helps to add media to a web page.</h2>
<br /></center>
<br />
<embed src="F:\MUSIC\ABCD 2\04 - ABCD2 - Happy Birthday [Songspk.LINK].mp3"  align="center"
autostart="true" loop="2" hidden="false" width="1000" height="400" volume="60">
</embed>
</body>
</html>


Output :



Comments

Popular posts from this blog

Non Restoring Division Algorithm Implementation in C

Hackerrank Modified Kaprekar Numbers Solution

Bit Stuffing Code Implementation in Java