Prop Html Id
# HTML DOM id Attribute
[ Element Object](#)
* * *
## Definition and Usage
The id attribute sets or returns the id of an element.
## Syntax
HTMLElementObject.id=_id_
* * *
## Browser Support

The id attribute is supported by all major browsers.
* * *
## Example
## Example
Output the id of the link:
var x=document.getElementById("myAnchor"); document.write(x.id);
[Try it yourself Β»](#)
* * Element Object](#)
YouTip