Home  >  Article  >  Web Front-end  >  html: Detailed explanation of the use of object tags

html: Detailed explanation of the use of object tags

黄舟
黄舟Original
2017-06-30 11:07:522854browse

Definition and Usage

Define an embedded object. Please use this element to add multimedia to your XHTML pages. This element allows you to specify data and parameters for objects inserted into an HTML document, as well as code that can be used to display and manipulate the data. The

object element is used to add multiple media 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.

tag is used to contain objects such as images, audio, video, Java applets, ActiveX, PDF, and Flash.

Object was originally intended to replace img and applet elements. However, this did not happen due to bugs and lack of browser support.

The browser's object support depends on the object type. Unfortunately, major browsers all use different code to load the same object types.

Fortunately, object object provides a solution. If the object element is not shown, the code between and is executed. This way we can nest multiple object elements (one for each browser).

Example

Add an object to the HTML code:

<object classid="clsid:F08DF954-8592-11D1-B16A-00C0F0283628" id="Slider1" width="100" height="50">
<param name="BorderStyle" value="1" /> 
<param name="MousePointer" value="0" /> 
<param name="Enabled" value="1" /> 
<param name="Min" value="0" /> 
<param name="Max" value="10" /> 
</object>

Optional attributes

html: Detailed explanation of the use of object tags

param The tag provides parameters for the tag that contains it.

Syntax:

The param element allows you to specify run-time settings for the object inserted into the XHTML document.

Differences between HTML and XHTML:

In HTML, the tag does not have a closing tag.

In XHTML, the tag must be closed.

S: Strict, T: Transitional, F: Frameset

The above is the detailed content of html: Detailed explanation of the use of object tags. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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