Definition and Usage. The id property sets or returns the value of the id attribute of a link. The id attribute specifies the id of an anchor, and can be used to create a bookmark inside a document.