HTML object Tag

The object tag is used to embed objects such as flash and images etc.

Example

This example shows a YouTube video embedded using the object tag.

Code Output
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/BYIo3lQrm4w&hl=en&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/BYIo3lQrm4w&hl=en&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>

Notes

  • Use this tag instead of the applet tag.

Attributes for the object tag

Attribute

Description

Value(s)

DOCTYPE

Strict DOCTYPE Attributes

Non-Strict DOCTYPE Attributes

Common attributes for the object tag

class, style, id, title, dir, xml:lang, lang, accesskey, tabindex

Javascript Event attributes for the object tag

onmousedown, onmouseup, onclick, ondblclick, onmouseover, onmouseout, onmousemove, onkeydown, onkeyup, onkeypress, onfocus, onblur

Comments