Home > Web Front-end > HTML Tutorial > Detailed explanation of object and param tags in html

Detailed explanation of object and param tags in html

黄舟
Release: 2017-07-03 14:17:14
Original
2320 people have browsed it

object tag

Function: The object tag is used to define an embedded multi-media object.

Syntax: ...

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 and is replacement text that will be displayed if the user's browser does not support this tag.

The object element generally contains the tag, and the tag can be used to define playback parameters.

The difference between and 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 tag should be placed inside the 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>
Copy after login

Description: The tag indicates embedding an object, and the tag specifies the relevant parameters of the object.

In this example, the 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>
Copy after login

Note: If the 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!

Related labels:
source:php.cn
Previous article:The valueType attribute of the param tag under the object tag in html Next article:Sharing the use of html tags and
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template