Some of the time you have to include music or video into your site page. The least demanding approach to add video or sound to your site is to incorporate the extraordinary HTML tag called <embed>. This label makes the program itself incorporate controls for the mixed media naturally gave program bolsters <embed> tag and given media sort.
You can likewise incorporate a <noembed> tag for the programs which don't perceive the <embed> tag. You could, for instance, utilize <embed> to show a motion picture of your decision, and <noembed> to show a solitary JPG picture if program does not bolster <embed> tag.
Illustration
Here is a basic case to play an inserted midi record −
You can put any media record in src property. You can attempt it yourself by giving different sorts of documents.
The <embed> Tag Attributes
Following is the rundown of imperative characteristics which can be utilized with <embed> tag.
Note −The adjust and autostart properties deplored in HTML5. Try not to utilize these properties.
Bolstered Video Types
You can utilize different media sorts like Flash motion pictures (.swf's), (.avi), and's (.mov) record sorts inside implant tag.
.swf records − are the document sorts made by Macromedia's Flash program.
.wmv records − are Microsoft's Window's Media Video document sorts.
.mov records − are Apple's Quick Time Movie design.
.mpeg records − are motion picture documents made by the Moving Pictures Expert Group.
Foundation Audio
You can utilize HTML <bgsound> tag to play a soundtrack out of sight of your site page. This tag is upheld by Internet Explorer just and a large portion of alternate programs disregard this tag. It downloads and plays a sound record when the host archive is first downloaded by the client and showed. The foundation sound record likewise will replay at whatever point the client invigorates the program.
Note − The bgsound tag is deplored and it should be evacuated in a future form of HTML. So they ought not be utilized rather, it's recommended to utilize HTML5 label sound for including sound. Yet at the same time for learning reason, this section will clarify bgsound tag in detail.
This tag is having just two qualities circle and src. Both these traits have same significance as clarified previously.
Here is a straightforward case to play a little midi document −
This will create the clear screen. This tag does not show any part and stays covered up.
Web Explorer can likewise deal with just three distinctive sound organization documents − wav, the local configuration for PCs; au, the local arrangement for most Unix workstations; and MIDI, a general music-encoding plan.
HTML Object tag
HTML 4 presents the <object> component, which offers a generally useful answer for non specific question consideration. The <object> component permits HTML creators to indicate everything required by a question for its introduction by a client operator.
Here are a couple of cases −
Case - 1
You can insert a HTML record in a HTML archive itself as takes after −
Here alt trait will come into picture if program does not bolster protest tag.
Illustration - 2
You can implant a PDF archive in a HTML report as takes after −
Case - 3
You can determine a few parameters identified with the report with the <param> tag. Here is a case to implant a wav document −
Illustration - 4
You can include a blaze archive as takes after −
Illustration - 5
You can include a java applet into HTML archive as takes after −
You can likewise incorporate a <noembed> tag for the programs which don't perceive the <embed> tag. You could, for instance, utilize <embed> to show a motion picture of your decision, and <noembed> to show a solitary JPG picture if program does not bolster <embed> tag.
Illustration
Here is a basic case to play an inserted midi record −
<!DOCTYPE html> <html> <head> <title>HTML embed Tag</title> </head> <body> <embed src = "/html/yourfile.mid" width = "100%" height = "60" > <noembed><img src = "Rizvi.gif" alt = "Alternative Media" ></noembed> </embed> </body> </html>
You can put any media record in src property. You can attempt it yourself by giving different sorts of documents.
The <embed> Tag Attributes
Following is the rundown of imperative characteristics which can be utilized with <embed> tag.
Note −The adjust and autostart properties deplored in HTML5. Try not to utilize these properties.
Sr.No | Attribute & Description |
---|---|
1 |
align
Determines how to align the object. It can be set to either center, left or right.
|
2 |
autostart
This boolean attribute indicates if the media should start automatically. You can set it either true or false.
|
3 |
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)
|
4 |
playcount
Specifies the number of times to play the sound. This is alternate option for loopif you are usiong IE.
|
5 |
hidden
Specifies if the multimedia object should be shown on the page. A false value means no and true values means yes.
|
6 |
width
Width of the object in pixels
|
7 |
height
Height of the object in pixels
|
8 |
name
A name used to reference the object.
|
9 |
src
URL of the object to be embedded.
|
10 |
volume
Controls volume of the sound. Can be from 0 (off) to 100 (full volume).
|
Bolstered Video Types
You can utilize different media sorts like Flash motion pictures (.swf's), (.avi), and's (.mov) record sorts inside implant tag.
.swf records − are the document sorts made by Macromedia's Flash program.
.wmv records − are Microsoft's Window's Media Video document sorts.
.mov records − are Apple's Quick Time Movie design.
.mpeg records − are motion picture documents made by the Moving Pictures Expert Group.
<!DOCTYPE html> <html> <head> <title>HTML embed Tag</title> </head> <body> <embed src = "/html/yourfile.swf" width = "200" height = "200" > <noembed><img src = "yourage.gif" alt = "Alternative Media" ></noembed> </embed> </body> </html>
Foundation Audio
You can utilize HTML <bgsound> tag to play a soundtrack out of sight of your site page. This tag is upheld by Internet Explorer just and a large portion of alternate programs disregard this tag. It downloads and plays a sound record when the host archive is first downloaded by the client and showed. The foundation sound record likewise will replay at whatever point the client invigorates the program.
Note − The bgsound tag is deplored and it should be evacuated in a future form of HTML. So they ought not be utilized rather, it's recommended to utilize HTML5 label sound for including sound. Yet at the same time for learning reason, this section will clarify bgsound tag in detail.
This tag is having just two qualities circle and src. Both these traits have same significance as clarified previously.
Here is a straightforward case to play a little midi document −
<!DOCTYPE html> <html> <head> <title>HTML embed Tag</title> </head> <body> <bgsound src = "/html/yourfile.mid"> <noembed><img src = "yourimage.gif" ></noembed> </bgsound> </body> </html>
This will create the clear screen. This tag does not show any part and stays covered up.
Web Explorer can likewise deal with just three distinctive sound organization documents − wav, the local configuration for PCs; au, the local arrangement for most Unix workstations; and MIDI, a general music-encoding plan.
HTML Object tag
HTML 4 presents the <object> component, which offers a generally useful answer for non specific question consideration. The <object> component permits HTML creators to indicate everything required by a question for its introduction by a client operator.
Here are a couple of cases −
Case - 1
You can insert a HTML record in a HTML archive itself as takes after −
<object data = "data/test.htm" type = "text/html" width = "300" height = "200"> alt : <a href = "data/test.htm">test.htm</a> </object>
Here alt trait will come into picture if program does not bolster protest tag.
Illustration - 2
You can implant a PDF archive in a HTML report as takes after −
<object data = "data/test.pdf" type = "application/pdf" width = "300" height = "200"> alt : <a href = "data/test.pdf">test.htm</a> </object>
Case - 3
You can determine a few parameters identified with the report with the <param> tag. Here is a case to implant a wav document −
<object data = "data/test.wav" type = "audio/x-wav" width = "200" height = "20"> <param name = "src" value = "data/test.wav"> <param name = "autoplay" value = "false"> <param name = "autoStart" value = "0"> alt : <a href = "data/test.wav">test.wav</a> </object>
Illustration - 4
You can include a blaze archive as takes after −
<object classid = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id = "penguin" codebase = "someplace/swflash.cab" width = "200" height = "300"> <param name = "movie" value = "flash/penguin.swf" /> <param name = "quality" value = "high" /> <img src = "penguin.jpg" width = "200" height = "300" alt = "Penguin" /> </object>
Illustration - 5
You can include a java applet into HTML archive as takes after −
<object classid = "clsid:8ad9c840-044e-11d1-b3e9-00805f499d93" width = "200" height = "200"> <param name = "code" value = "applet.class"> </object>The classid trait recognizes which form of Java Plug-in to utilize. You can utilize the discretionary codebase ascribe to determine if and how to download the JRE.
0 comments:
Post a Comment