HTML <object> name attribute

Definition and Usage

name The attribute specifies the name of the <object> element.

name The attribute is used to refer to the <object> element in JavaScript (another method is to use its id attribute to refer to it).

Example

Object elements with name attribute:

<object data="tulip-yellow.jpg" width="600" height="400" name="obj1"></object>

Try It Yourself

Syntax

<object name="name">

Attribute Value

Value Description
name The name of the <object> element.

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Support Support Support Support