HTML data Attribute

HTML data Attribute: The HTML data attribute defines the Uniform Resource Locator(URL) of the resource that is used by the object.

HTML data Attribute

The HTML data attribute can be applied to the <object> element.

Syntax: <object data=”URL”>

Browser Support

The HTML data attribute is supported by the following browsers:

  • Chrome
  • Firefox
  • Internet Explorer
  • Safari
  • Opera

Example: for <object> element

<!DOCTYPE html>
<html>
<body>
<object width="400" height="400" data="helloworld.swf">
</object> 
</body>
</html>

Output

HTML data attribute