Html-object-tag
提供:Dev Guides
HTML-<オブジェクト>タグ
説明
HTML <object>タグは、HTMLドキュメントにマルチメディアを埋め込むために使用されます。 <param>タグもこのタグとともに使用して、さまざまなパラメーターを定義します。
例
<!DOCTYPE html>
<html>
<head>
<title>HTML object Tag</title>
</head>
<body>
<object data = "/html/test.jpg" type = "text/html" width = "300" height = "200">
alt : <a href = "/html/test">test.jpg</a>
</object>
</body>
</html>
これは、次の結果を生成します-
グローバル属性
このタグは、− link:/html/html_attributes_reference [HTML属性リファレンス]で説明されているすべてのグローバル属性をサポートします
特定の属性
HTML <object>タグは、次の追加属性もサポートしています-
Attribute | Value | Description |
---|---|---|
align | left right top bottom | Defines visual alignment of the object |
archive | URL | A space separated list of URL’s to archives. |
border | pixels | Specifies border width around the object |
classid | Class ID | Defines a class ID value as set in the Windows Registry or a URL. |
codebase | URL | Specifies the path where object code is located. |
codetype | mime type | The internet media type of the code referred to by the classid attribute. |
data | URL | Specifies the URL for Object data. |
declare | declare | Defines that the object should only be declared, not created or instantiated until needed. |
height | pixels | Specifies the hight of the object. |
hspace | pixels | Specifies the horizontal space around the object. |
name | objectname | Specifies a unique name for the object |
standby | text | Defines a text to display while the object is loading. |
type | mime type | Defines the MIME type of data specified in the data attribute. |
usemap | URL | Specifies a URL of a client-side image map to be used with the object |
vspace | pixels | Specifies the vertical space around the object. |
width | pixels | Specifies the width of the object. |
イベント属性
このタグは、− link:/html/html_events_reference [HTMLイベントリファレンス]で説明されているすべてのイベント属性をサポートします。
ブラウザのサポート
Chrome | Firefox | IE | Opera | Safari | Android |
---|---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes | Yes |