Specify URL of Resource in HTML Object



Use the data attribute in HTML to specify the URL of the resource to be used by the object in HTML.

Example

You can try to run the following code to implement the data attribute −

<!DOCTYPE html>
<html>
   <body>
      <h2>Demonstration</h2>
      <object width = "250" height = "300" data = "demo.swf">
      </object>
   </body>
</html>
Updated on: 2020-03-03T09:40:41+05:30

138 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements