Is it appropriate to use the ID attribute in the tags? In which cases could I use it?
Yes it is appropriate as long as there is only one element with the ID. Therefore, care must be taken in its use. Nowadays, with jQuery widely accepted, it is much more common to use classes, even to access JavaScript elements, since selecting an element via class is as easy as via ID:
Via ID :
elemento = $("#id")
Via class : elemento = $(".classe")
Which versions of HTML would support this type of reference? In this case, does the ID always have the selector function?
All HTML elements can have an ID. HTML, because it is an extremely semantic language, does not impute a sense of functionality directly, but rather of meaning. The ID identifies the element within the document. The features can be of the most diverse. For example, you could use the ID to even identify a product in the database:
<li class="product" id="product-323"></li>
Note: I used a prefix instead of leaving the number pure. This is to avoid duplicate IDs on the page. Another object, such as <a id="category-323"></a>
could end up having the same attribute ID by accident.