HTML <object> nameAttribute
Example
<object> element with a name attribute:
<object data="helloworld.swf" width="400" height="400"
name="obj1"></object>
name="obj1"></object>
Try it yourself »
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the name attribute.
Definition and Usage
The name attribute specifies the name of the <object> element.
The name attribute is used to reference the <object> element in JavaScript (the alternative is to reference it by using the id attribute).
Differences between HTML 4.01 and HTML5
None.
Syntax
<object name="name">
Attribute Values
| Value | Description |
|---|---|
| name | The name of the <object> element. |
HTML <object> tag Other Extensions