Tag HTML <oggetto>
Esempio
Un'immagine incorporata:
<object data="pic_trulli.jpg" width="300" height="200"></object>
Esempio
Una pagina HTML incorporata:
<object data="snippet.html" width="500" height="200"></object>
Esempio
Un video incorporato:
<object data="video.mp4" width="400" height="300"></object>
Definizione e utilizzo
Il <object>
tag definisce un contenitore per una risorsa esterna.
La risorsa esterna può essere una pagina Web, un'immagine, un lettore multimediale o un'applicazione plug-in.
Per incorporare un'immagine, è meglio utilizzare il <img>
tag.
Per incorporare HTML, è meglio utilizzare il <iframe>
tag.
Per incorporare video o audio, è meglio utilizzare i tag <video>
e .<audio>
Supporto del browser
Element | |||||
---|---|---|---|---|---|
<object> | Yes | Yes | Yes | Yes | Yes |
Plug-in
Il <object>
tag è stato originariamente progettato per incorporare i plug-in del browser.
I plug-in sono programmi per computer che estendono le funzionalità standard del browser.
I plug-in sono stati utilizzati per molti scopi diversi:
- Esegui applet Java
- Esegui controlli ActiveX
- Visualizza filmati Flash
- Visualizza mappe
- Scansione antivirus
- Verifica un ID banca
Avvertimento !
La maggior parte dei browser non supporta più applet e plug-in Java.
I controlli ActiveX non sono più supportati in nessun browser.
Il supporto per Shockwave Flash è stato disattivato anche nei browser moderni.
Attributi
Attribute | Value | Description |
---|---|---|
data | URL | Specifies the URL of the resource to be used by the object |
form | form_id | Specifies which form the object belongs to |
height | pixels | Specifies the height of the object |
name | name | Specifies a name for the object |
type | media_type | Specifies the media type of data specified in the data attribute |
typemustmatch | true/false | Specifies whether the type attribute and the actual content of the resource must match to be displayed |
usemap | #mapname | Specifies the name of a client-side image map to be used with the object |
width | pixels | Specifies the width of the object |
Attributi globali
Il <object>
tag supporta anche gli attributi globali in HTML .
Attributi dell'evento
Il <object>
tag supporta anche gli attributi dell'evento in HTML .
Pagine correlate
Esercitazione HTML: elemento oggetto HTML
Riferimento HTML DOM: Oggetto Oggetto
Impostazioni CSS predefinite
La maggior parte dei browser visualizzerà l' <object>
elemento con i seguenti valori predefiniti:
object:focus {
outline: none;
}