What is an ID?
More About IDs
The ID attribute can be used with any HTML element, not just ones with an opening and closing tag. For example, you can use the ID attribute on elements like the img tag, which doesn’t have a closing tag.
Finally, remember that the ID attribute’s value must be unique within the HTML document.