There are two primary reasons that you might want to use an id attribute on an element − If an element carries an id attribute as a unique identifier, … The HTML