How to link an anchor to a class element?

How do I link an anchor tag to a class attribute? I have an element that has a certain class, and I want to use the “href” attribute to link to that specific class. I know to link an id attribute using “href=#id”, but how would I link to a class using the “href” of an anchor tag?

A class is not a page fragment identifier that can be hooked like an id. What you are asking to do cannot be done. The main reason is because a link cannot be to more than one URL, which is why there is only ever one element with a specific id in any single document. A class may be applied to multiple page elements. We can see how that won’t align with the schema.