This is mostly true, but it's usually better/easier to use the semantic element for any particular use case. In this case, for example, to correctly mimic how the <a> tag works, you'll need to handle both click events and keyboard events (e.g. space for clicking), and even then you'll struggle to handle right-clicks, ctrl-clicks or middle clicks in a way that is truly cross-platform.
The <a> tag, on the other hand, just does all that for you.
The <a> tag, on the other hand, just does all that for you.