id attribute | id property
Standard XML attribute for assigning a unique name to an element.
This property is read/write.
![]() ![]() |
Syntax
| HTML |
|---|
<element id="ptr" ... > |
| JavaScript |
|---|
object.id = ptr ptr = object.id |
Property values
Type: DOMString
A string containing the name for the ID.
Standards information
- Scalable Vector Graphics: Basic Data Types and Interfaces, Section 4.5.1
See also
Show:

