Home > Article > Web Front-end > Detailed explanation of object and param tags in html
object tag
Function: The object tag is used to define an embedded multi-media object.
Syntax: 273238ce9338fbb04bee6997e5552b95...eb50c9ec568c9b96871b9e94a1ff3fd1
The object element is used to add multimedia objects to the page, including Flash, audio, video, etc. It specifies the object's data and parameters, as well as the code that can be used to display and manipulate the data.
The text between 273238ce9338fbb04bee6997e5552b95 and eb50c9ec568c9b96871b9e94a1ff3fd1 is replacement text that will be displayed if the user's browser does not support this tag.
The object element generally contains the 0c68fef83818661b6da588c77ca3985e tag, and the 0c68fef83818661b6da588c77ca3985e tag can be used to define playback parameters.
The difference between273238ce9338fbb04bee6997e5552b95 and d8e2720730be5ddc9c2a3782839e8eb6 tags: Both are objects used to play multimedia files, the object element is used for IE browser, and the embed element is used for non- IE browser, in order to ensure compatibility, usually we use two elements at the same time, and the browser will automatically ignore tags it does not support. When using two elements at the same time, the d8e2720730be5ddc9c2a3782839e8eb6 tag should be placed inside the 273238ce9338fbb04bee6997e5552b95 tag.
Differences between HTML and XHTML: None.
S: Strict, T: Transitional, F: Frameset
Attribute Value Description Description DTD
name String Defines the name of the object. STF
classid class ID Defines the ID value of a class embedded in the Windows Registry or in a URL. This attribute can be used to specify the location of an object contained in the browser, usually a Java class. STF
archive URL A space-separated list of URLs pointing to archive files. These archive files contain the resources associated with the object. STF
codebase URL Defines where the code required for the object can be found, providing a base URL. STF
codetype MIME type The MIME type of the code referenced by the classid attribute. STF
data URL Defines the URL that refers to the object data. If there are data files that require object processing, use the data attribute to specify these data files. STF
type MIME type Defines the MIME type of data that appears in the file specified in the data attribute. STF
declare declare Definition This object can only be declared, but cannot be created or instantiated until this object is used. STF
width Length value Defines the width of the object. STF
height Length value Defines the height of the object. STF
align left
right top bottom bottom
Defines the text alignment around the object. TF
vspace Length value Defines the vertical space around the object. TF
hspace Length value Defines the horizontal space around the object. TF
border Pixel value Defines the border around the object. TF
standby String Defines the text displayed when the object is loading. STF
usemap URL Specifies the URL of the client-side image map used with the object. STF
Standard attributes:
id, class, style, title, dir, lang, xml:lang, accesskey, tabindex
For details, see: HTML standard attributes.
Event attributes:
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout,onkeypress,onkeydown,onkeyup
Play Flash.
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/ cabs/flash/swflash.cab#version=7,0,19,0" width="150" height="150"> <param name="movie" value="../../image/clock.swf" /> <param name="quality" value="high" /> <param name="wmode" value="transparent" /> </object>
Description: The 273238ce9338fbb04bee6997e5552b95 tag indicates embedding an object, and the 0c68fef83818661b6da588c77ca3985e tag specifies the relevant parameters of the object.
In this example, the d8e2720730be5ddc9c2a3782839e8eb6 tag is not added, so the results may not be visible in some non-IE browsers.
Play video.
<object width="400" height="300" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/ nsmp2inf.cab#Version=6,4,5,715" standby="正在加载..." type="application/x-oleobject" hspace="5"> <param name="FileName" value="1.wmv" /> <param name="AutoRewind" value="1" /> <param name="ShowControls" value="1" /> <param name="ShowPositionControls" value="0" /> <param name="ShowAudioControls" value="1" /> <param name="ShowTracker" value="1" /> <param name="ShowDisplay" value="0" /> <param name="ShowStatusBar" value="1" /> <param name="ShowGotoBar" value="0" /> <param name="ShowCaptioning" value="0" /> <param name="AutoStart" value="0" /> <param name="AnimationAtStart" value="0" /> <param name="TransparentAtStart" value="0" /> <param name="AllowChangeDisplaySize" value="0" /> <param name="AllowScan" value="0" /> <param name="EnableContextMenu" value="1" /> <param name="ClickToPlay" value="0" /> </object>
Note: If the d8e2720730be5ddc9c2a3782839e8eb6 tag is used at the same time, the compatibility will be better.
The above is the detailed content of Detailed explanation of object and param tags in html. For more information, please follow other related articles on the PHP Chinese website!