The HTML data attribute
Quick answer
The HTML data attribute specifies the URL of the resource the object embeds. It is used on the <object> element.
Overview
The data attribute specifies the URL of the resource the object embeds. It applies to the <object> element.
Do not confuse it with the global data-* attributes — this data is the resource URL for <object> only.
Syntax
<object data="file.pdf" type="application/pdf"></object>
Values
| Value |
|---|
| A URL pointing to the resource. |
Best practices
Frequently asked questions
What does the data attribute do?
Sets the URL of an embedded object.