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>

Updated on: 03-Mar-2020

89 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements