Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML object data Attribute

HTML The data attribute

HTML object Tag Reference HTML tag

Example

How to Use element to embed a Flash file:

Try it »


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

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 (such as href="http://www.example.com/helloworld.swg")
  • Relative URL - points to data within the website (such as href="helloworld.swg")
  • |

    HTML object Tag Reference HTML tag