HTML <object> data attribute

Definition and usage

data Attribute specifies the URL of the resource to be used by the object.

Example

How to embed images using the <object> element:

<object data="tulip-yellow.jpg" width="600" height="400"></object>

Try it yourself

Syntax

<object data="URL">

Attribute value

Value Description
URL

Specifies the URL of the resource to be used by the object.

Possible values:

  • Absolute URL - points to data on another website (such as href="http://www.example.com/images/pic_trulli.jpg")
  • Relative URL - points to data within the website (such as href="pic_trulli.jpg")

Browser support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Support Support Support Support