To be clear,
id is not a tag it is an attribute.
HTML tags vs elements vs attributes
Tags are used to mark up the start and end of an HTML element. The following are paragraph tags.
An element in HTML represents some kind of structure or semantics and generally consists of a start tag, its attributes (if any), content, and an end tag. The following is a paragraph element:
<p>This is the content of the paragraph element.</p>
An attribute defines a property for an element. It consists of an attribute/value pair and appears within the element’s start tag. An element’s start tag may contain any number of space separated attribute/value pairs.
The most popular misuse of the term “tag” is referring to
alt attributes as “alt tags”. There is no such thing in HTML.
alt is an attribute, not a tag.
<img src="foobar.gif" alt="A foo can be balanced on a bar by placing its fubar on the bar's foobar.">