My argument is about consistency between the input and output, and not about the consistency of implementations. It’s much easier to see in an example:
This is consistent behavior:
[foo](bar) <a href="bar">foo</a>
[foo](ba) <a href="ba">foo</a>
[foo](b) <a href="b">foo</a>
[foo]() <a href="">foo</a>
This is inconsistent behavior:
[foo](bar) <a href="bar">foo</a>
[foo](ba) <a href="ba">foo</a>
[foo](b) <a href="b">foo</a>
[foo]() <a>foo</a>
I’m not sure how you can argue that the HTMLAnchorElement
is not an anchor, when the actual spec clearly states:
If the a element has an href attribute, then it represents a hyperlink (a hypertext anchor) labeled by its contents.
emphasis mine
I recommend avoiding w3schools, they’re not affiliated with the w3c and often have moderately stale content.