ID attribute and ids JavaScript object

The ID attribute lets you assign a unique identifier to an element.

The ids JavaScript object lets you set properties for the element which has that identifier.