DEV Community

Cover image for HTML tags | object
Carlos Espada
Carlos Espada

Posted on • Edited on

1

HTML tags | object

It represents an external resource, which can be treated as an image, a media player, a nested browsing context or a resource to be handled by a plugin. It can only <param> elements.

The <object> tag was originally designed to embed browser Plug-ins.
Most browsers no longer support Java Applets and Plug-ins. ActiveX controls are no longer supported in any browser. The support for Shockwave Flash has also been turned off in modern browsers.

  • To embed a picture, it is better to use the <img> tag.
  • To embed HTML, it is better to use the <iframe> tag.
  • To embed video or audio, it is better to use the <video> and <audio> tags.

It can have three implicit ARIA roles: application, document or image.

Attributes

data

The address of the resource as a valid URL. At least one of data and type must be defined.

form

The form element, if any, that the object element is associated with (its form owner). The value of the attribute must be an ID of a <form> element in the same document.

height

The height of the displayed resource, in CSS pixels (absolute values only. NO percentages).

name

The name of valid browsing context (HTML5) or the name of the control (HTML 4).

type

The content type of the resource specified by data. At least one of data and type must be defined.

usemap

A hash-name reference to a <map> element; that is a # followed by the value of a name of a map element.

width

The width of the display resource, in CSS pixels (absolute values only. NO percentages).

  • Type: block
  • Self-closing: No
  • Semantic value: No

Definition and example | Support

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay