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 refer to it using its id attribute).
Example
The <object> elements with name attribute:
<object data="tulip-yellow.jpg" width="600" height="400" name="obj1"></object>
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 |