W3Schools.com

HTML <object> data Attribute

HTML object Tag Reference HTML <object> tag

Example

How to use the <object> element to embed a Flash file:

<object width="400" height="400" data="helloworld.swf"></object>

Try it yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The data attribute is supported in all major browsers.


Definition and Usage

The data attribute specifies the URL of the resource to be used by the object.


Syntax

<object data="URL">

Attribute Values

Value Description
URL Specifies the URL of the resource to be used by the object.

Possible values:

  • An absolute URL - points to data on another web site (like href="http://www.example.com/helloworld.swg")
  • A relative URL - points to data within a web site (like href="helloworld.swg")


HTML object Tag Reference HTML <object> tag
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$3.98 Unlimited Hosting
Premium Website Design
WEB BUILDING
XML Editor - Free Trial!
FREE Website BUILDER
Best Website Templates Top CSS Templates
CREATE HTML Websites
EASY WEBSITE BUILDER
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE