HTML data Attribute

❮ HTML Attributes

Example

<object data="demo/image.jpg" width="300" height="150"></object>

Meaning

The data attribute specifies a URL for data required by an object.




Standard Syntax

<element data="URL">



Browser Support




Status




Applies to:

The data attribute can be used on the following element:

Element Attribute
<object> data






Attribute Values

Value Description
URL

Value can be

  • An absolute URL - resource within or another web site ( href="http://www.example.com/index.html")
  • A relative URL - the resource within a web site ( href="index.html")
❮ HTML Attributes