From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/html/element%2Fobject.html | 324 +++++++++++++++++++++++++++++++++++++ 1 file changed, 324 insertions(+) create mode 100644 devdocs/html/element%2Fobject.html (limited to 'devdocs/html/element%2Fobject.html') diff --git a/devdocs/html/element%2Fobject.html b/devdocs/html/element%2Fobject.html new file mode 100644 index 00000000..7c2fb7f1 --- /dev/null +++ b/devdocs/html/element%2Fobject.html @@ -0,0 +1,324 @@ +

<object>: The External Object element

The <object> HTML element represents an external resource, which can be treated as an image, a nested browsing context, or a resource to be handled by a plugin.

+

Try it

+
+

Attributes

+
+

This element includes the global attributes.

+archive Deprecated +

A space-separated list of URIs for archives of resources for the object.

+border Deprecated +

The width of a border around the control, in pixels.

+classid Deprecated +

The URI of the object's implementation. It can be used together with, or in place of, the data attribute.

+codebase Deprecated +

The base path used to resolve relative URIs specified by classid, data, or archive. If not specified, the default is the base URI of the current document.

+codetype Deprecated +

The content type of the data specified by classid.

data

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

+declare Deprecated +

The presence of this Boolean attribute makes this element a declaration only. The object must be instantiated by a subsequent <object> element. Repeat the <object> element completely each time the resource is reused.

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).

+standby Deprecated +

A message that the browser can show while loading the object's implementation and data.

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)

+
+

Examples

+ +

Embed a video

+
+

HTML

+

html

+
<object
+  type="video/mp4"
+  data="https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm"
+  width="600"
+  height="140">
+  <img src="path/image.jpg" alt="useful image description" />
+</object>
+
+

Result

+
+ + +

If the video in the example fails to load, the user will be provided with an image as fallback content. The <img> tag is used to display an image. We include the src attribute set to the path to the image we want to embed. We also include the alt attribute, which provides the image with an accessible name. If the image also fails to load, the content of the alt attribute will be displayed.

+
+

Technical summary

+
Content categories Flow content; phrasing content; embedded content, palpable content; if the element has a usemap attribute, interactive content; listed, submittable form-associated element.
Permitted content zero or more <param> elements, then transparent.
Tag omission None, both the starting and ending tag are mandatory.
Permitted parents Any element that accepts embedded content.
Implicit ARIA role No corresponding role
Permitted ARIA roles +application, document, img +
DOM interface HTMLObjectElement
+

Specifications

+
+ + +
Specification
HTML Standard
# the-object-element
+

Browser compatibility

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariWebView AndroidChrome AndroidFirefox for AndroidOpera AndroidSafari on IOSSamsung Internet
object1121Yes1534.41841421.0
archive1121Yes1534.41841421.0
border1121Yes1534.41841421.0
classidYes121YesYesYesYesYes4YesYesYes
codebase1121Yes1534.41841421.0
codetype1121Yes1534.41841421.0
data1121Yes1534.41841421.0
declare1121Yes1534.41841421.0
form1121Yes1534.41841421.0
height1121Yes1534.41841421.0
name1121Yes1534.41841421.0
standby1121Yes1534.41841421.0
tabindex1121Yes153.14.41841421.0
type1121Yes1534.41841421.0
usemap1121Yes1534.41841421.0
width1121Yes1534.41841421.0
+

See also

+
+

+ © 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
+ https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object +

+
-- cgit v1.2.3