How to specify media type of data specified in data attribute in HTML5 ? Improve Improve Improve Like Article Like Save Article Save Share Report issue Report The following approach covers how to specify the URL of the resource to be used by the object in HTML5. This can be used in pages where content from an external source is required. Approach: We will use the data attribute of the <object> element to specify the URL of the resource that to be used for the object. The specified URL can be relative or absolute. Syntax: <object data="URL"> The below example illustrates the data attribute to specify the URL of the resource to be used by the object. Example: HTML <!DOCTYPE html> <html> <body> <h1 style="color: green;"> GeeksforGeeks </h1> <p>Object with an image resource:</p> <object data= "https://media.geeksforgeeks.org/wp-content/uploads/20200327230544/g4gicon.png"> </object> <p>Object with a video resource:</p> <object data= "https://media.geeksforgeeks.org/wp-content/uploads/20200107020629/sample_video.mp4"> </object> </body> </html> Output: Last Updated : 31 Mar, 2021 Like Article Save Article Previous Create Scanning Animation Loader using HTML & CSS Next How to set the height and width of the video player in HTML5 ? Share your thoughts in the comments Add Your Comment Please Login to comment...