HTML <object> dataAttributes

HTML object 标签参考手册HTML <object> Tag

Example

How to use the <object> element to embed a Flash file:

<object width="400" height="400" data="helloworld.swf"></object>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the data attribute.


Definition and Usage

The data attribute specifies the URL of the resource used by the object.


Differences between HTML 4.01 and HTML5

None.


Syntax

<object data="URL">

Attribute Values

Value Description
URL Specifies the URL of the resource used by the object.

Possible values:

  • Absolute URL - points to data on another website (e.g., href="http://www.example.com/helloworld.swg")
  • Relative URL - points to data within the website (e.g., href="helloworld.swg.html")


HTML object 标签参考手册HTML <object> Tag Other Extensions