The difference between object and embed tags in html

Source: Internet
Author: User

? object defines an embedded object. Please use this element to add multimedia to your XHTML page. This element allows you to specify the data and parameters for inserting objects in an HTML document, as well as code that can be used to display and manipulate the data.

?<object> tags are used to include objects, images, audio, video, Java applets, ActiveX, PDF, and Flash.
The embed tag defines embedded content, such as plugins.

the difference between object and embed:
1, is to be compatible with different browsers, IE only support the resolution of the object; Firefox, Google, Safari only supports parsing of embed.
2. The object label uses a CLSID to represent the unique ID of the control, and the embed label uses the type to represent the unique name of the plug-in. For example, Flash plugin type: Application/x-shockwave-flash,mp3 playback plug-in type is audio/mpeg.
3, in order to be compatible with multiple browsers, you can dynamically load the object tag through IE browser, non-IE browser dynamically load embed tag, or embed embed tag inside the OBJECT tag.

A simple example of flash
Here is a sample code for inserting flash in a simple Web page:
The code is as follows:

<OBJECTClassID= "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"codebase= "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"WIDTH= "550"HEIGHT= "The "ID= "Mymoviename"> <PARAMNAME=movieVALUE= "myflashmovie.swf"> <PARAMNAME=qualityVALUE=high> <PARAMNAME=bgcolorVALUE= #FFFFFF> <EMBEDsrc= "http://www.doflash.net/"/support/flash/ts/documents/myflashmovie.swf "" Quality=highbgcolor= #FFFFFFWIDTH= "550"HEIGHT= "The "NAME= "Mymoviename"ALIGN=""type= "Application/x-shockwave-flash"pluginspage= "Http://www.macromedia.com/go/getflashplayer"> </EMBED> </OBJECT>


at this stage with JS embedded Flash is the most perfect method, Someone has written a very well embedded script that can be used in terms of underground download (recommended swfobject), Swfobject.jshttps://github.com/swfobject/swfobject

objec parameter description
The PARAM name tag is some of the features and playback parameters embedded in this playback plugin, such as (you can copy it down):  
<param name=" Playcount "value=" 1 "><!--control Repetitions:" X "for several repetitions; X=0, infinite loops. --> 

<param name= "autostart" value= "0" ><!--control playback mode: x=1, open the web automatically play; X=0, press the play key to play. -

<param name= "Clicktoplay" value= "1" ><!--control playback switch: x=1, mouse click to control playback or pause status; X=0, disable this feature. -

<param name= "displaysize" value= "0" ><!--control Playback screen: x=0, original size; X=1, half-size; x=2,2 times the size. -

<param name= "Enablefullscreen controls" value= "1" ><!--control Toggle fullscreen: x=1, allow switching to fullscreen; X=0, disable this feature. -

<param name= "Showaudio controls" value= "1" ><!--Control Volume: X=1 to allow volume adjustment; x=0, disable volume adjustment. -

<param name= "enablecontext Menu" value= "1" ><!--control shortcut menus: x=1, allowing the right-click menu to be used; X=0, disable the right-click menu. -

<param name= "Showdisplay" value= "1" ><!--Control Copyright information: X=1, show movie and author information; x=0, do not display relevant information--

<param name= "AutoStart" value= "1" ><!--auto-play

<param name= "Balance" value= "0" ><!--adjust the left and right channel balance, with the old player code above--

<param name= "Enabled" value= "-1" ><!--player is human-controlled

<param name= "Enablecontextmenu" value= "1" ><!--if context menu is enabled--

<param name= "url" value= "http://1.wma" > <!--played file address--><param name= "Playcount" value= "1" ><!-- Play Count control, integer-to-

<param name= "Rate" value= "1" ><!--playback speed control, 1 normal, allow fractional,1.0-2.0-->

<param name= "currentposition" value= "0" ><!--control Settings: Current Position--

<param name= "Currentmarker" value= "0" ><!--control Settings: Current Tag--

? <param name= "Defaultframe" value= "" ><!--Show default Frames--

<param name= "Invokeurls" value= "0" ><!--script command settings: whether to invoke url-->

<param name= "BaseURL" value= "" ><!--script command settings: called url-->

<param name= "Stretchtofit" value= "0" ><!--proportional stretch--

<param name= "Volume" value= "><!--default sound size 0%-100%,50 50%-->

<param name= "Mute" value= "0" ><!--mute--

<param name= "Uimode" value= "mini" ><!--player display mode: full display all; Mini is the most simplified; None does not show playback control, only the video window is displayed; Invisible all does not display-

<param name= "Windowlessvideo" value= "0" ><!--if it is 0 can allow full screen, otherwise it can only be viewed in the window

<param name= "fullscreen" value= "0" ><!--start playing automatically fullscreen--

? <param name= "Enableerrordialogs" value= "-1" ><!--whether to enable the error prompt report--

? <param name= "Samistyle" value><!--Sami style--

? <param name= "Samifilename" value><!--subtitles id-->

turn from:The difference between an object and a embed tag in HTML

The difference between object and embed tags in html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.