English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Manual de referência HTML

大全 de etiquetas HTML

HTML: <object> etiqueta

O tag <object> do HTML é usado como um contêiner para incorporar recursos externos em documentos HTML, como áudio, vídeo, Flash, PDF, aplicativos externos ou plugins do navegador. Devido aos problemas de compatibilidade, o tag <object> é mais usado para incorporar recursos do que o tag <embed>. Este tag também é conhecido como elemento <object>.

Exemplo online

Use o elemento <object> para adicionar arquivos Flash ao HTML:

!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>Site de tutoriais básicos(oldtoolbag.com)</title> 
</head>
<body>
<object type="application/x-shockwave-flash" src="bookmark.swf" width="400" height="300"></object>
</body>
</html>
Teste e veja ‹/›

Navegador compatível

IEFirefoxOperaChromeOpera

Chrome

Safari

Currently, most browsers support the <object> tag.

Tag definition and usage instructions

Define an embedded object. Use this element to add multimedia to your XHTML page. This element allows you to specify the data and parameters of the object to be inserted in the HTML document, as well as the code that can be used to display and operate the data.

<object> tag is used to include objects, such as images, audio, video, Java applets, ActiveX, PDF, and Flash.

object's original intention was to replace the img and applet elements. However, due to vulnerabilities and lack of browser support, this has not been achieved./browser's object support depends on the object type. Unfortunately, mainstream browsers use different code to load the same object type.

and fortunately, the object provides a solution. If the object element is not displayed, the code located between <object> and <5object> between the code. In this way, we can nest multiple object elements (each corresponding to a browser). 4.01Compared to the <embed> tag, the <object> tag is more commonly used to embed external resources because the <object> tag is compatible with HTML

HTML 4.01 HTML5and XHMTL are compatible.

with HTML 4.01 Some differences in HTML5 Attributes in HTML

"form" is not supported in HTML.5 New properties defined.

In HTML5 In HTML, objects can be submitted within a form.

In HTML5 In HTML, objects no longer appear within the <head> element area.

Attribute

AttributeValueDescription
aligntop bottom middle left rightHTML5 Não suportado. HTML 4.01 Descontinuado. Specify the alignment of the <object> element relative to the surrounding elements.
archiveURLHTML5 Not supported. A list of URLs separated by spaces pointing to archive files. These files contain resources related to the object.
borderpixelsHTML5 Não suportado. HTML 4.01 Descontinuado. Specify the border width around the <object>.
classidclass_IDHTML5 Not supported. Defines the ID value of a class embedded in the Windows Registry or at a URL, this attribute can be used to specify the location of the object in the browser, usually a Java class.
codebaseURLHTML5 Not supported. Defines where the code required by the object can be found, providing a base URL.
codetypeMIME_typeHTML5 Not supported. The MIME type of the code referenced by the classid attribute.
dataURLDefine the URL of the resource used by the object.
declaredeclareHTML5 Não suportado. Define que o objeto pode ser declarado, mas não pode ser criado ou instanciado até que o objeto seja aplicado.
formHTML5form_idDefine um ou mais formulários aos quais o objeto pertence.
heightpixelsDefine a altura do objeto.
hspacepixelsHTML5 Não suportado. HTML 4.01 Descontinuado. Define o espaço em branco esquerdo e direito do objeto.
namenameDefine o nome do objeto.
standbytextHTML5 Não suportado. Define o texto exibido enquanto o objeto está sendo carregado.
typeMIME_typeDefine o tipo MIME do dados especificados na propriedade data.
usemap#mapnameDefine o nome do mapeamento de imagem do cliente usado juntamente com o objeto.
vspacepixelsHTML5 Não suportado. HTML 4.01 Descontinuado. Define o espaço em branco superior e inferior do objeto.
widthpixelsDefine a largura do objeto.

Atributos globais

<object> etiqueta suporta atributos globais, consulte a tabela de atributos completa Atributos globais HTML.

atributos de eventos

<object> etiqueta suporta todos Atributos de eventos HTML.

Artigos relacionados

Tutorial HTML:Elemento HTML Object