How to specify the URL of the resource to be used by the object in HTML?



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>

Advertisements