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

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more