HTML data Attribute

HTMLWeb DevelopmentFront End Technology

Tha data attribute sets the URL of the resource, which can be audio, video, pdf, flash, etc. used by the object.

Following is the syntax −

<object data="url">

The url is the URL of the resource used by the object.

Let us now see an example to implement the data attribute of the <object> element −


 Live Demo

<!DOCTYPE html>
<h2>CSS Demonstrating Application</h2>
   <object data="" height="400" width="600"></object>


In the above example, we have set the URL of the resource, which is a .swf file i.e. a flash file −

<object data="" height="400" width="600"></object>

The external link we have used in the <object> element is −
Published on 20-Jun-2019 10:52:35