English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag Reference

HTML object data attribute

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

 HTML <object> tag

Online Example

How to embed Flash files using the <object> element:

<!DOCTYPE html>
<html>
<head>
<title>HTML: <object> data attribute - Basic Tutorial Website (oldtoolbag.com)</title>
</head>
<body>
<object width="400" height="400" data="bookmark.swf"></object>
</body>
</html>
Test it out ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the data attribute.

Definition and Usage

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

HTML 4.01 With HTML5Differences

None.

Syntax

<object data="URL">

Attribute value

ValueDescription
URLSpecify the URL of the resource to be used by the object.
Possible values:
Absolute URL-Point to data on another website (for example href =“ http://www.example.com/helloworld.swg”)
Relative URL-Point to data within the website (for example href =“ helloworld.swg”)
 HTML <object> tag