html tutorial - data Attribute in HTML - html5 - html code - html form

data attribute in html

Learn html - html tutorial - data attribute in html - html examples - html programs

  • The data attribute defines the URL of the source to be used by the object.

Syntax for data attribute in HTML:

<object data = “URL”>

Applies To:

Element Attribute
<object> data

data Attribute Value:

Value Description
URL Defines the URL of the resource.

Sample Coding for data Attribute in HTML:

Tryit<!DOCTYPE html>
        <title>Wikitechy data attribute</title>
        <h2>HTML data attribute with example</h2>
        <object width="300" height="300" data="hibiscus.mp4">

Code Explanation for data Attribute in HTML:

data Attribute Code Explanation

  1. <object> tag is used to embed a video object within the document.
  2. data is an attribute, which indicates the URL of the video.

Output for data Attribute in HTML:

data Attribute Output

  1. The output shows the specified video.

Browser Support for data Attribute in HTML:

Yes Yes Yes Yes Yes

Related Searches to data Attribute in html

Adblocker detected! Please consider reading this notice.

We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

We need money to operate the site, and almost all of it comes from our online advertising.

Please add to your ad blocking whitelist or disable your adblocking software.