This has been a thing since the 90s. I really wish we'd done away with it for any document that specifies itself as HTML5.
It's great for hacking a tiny script together, however.
It's great for hacking a tiny script together, however.
See for example this thread where Mozilla tried to not do this: https://bugzilla.mozilla.org/show_bug.cgi?id=622491
IDs were the only way to get a reference to an element early on if I'm remembering correctly. Or maybe the DOM API just wasn't well known. All the examples and docs just used IDs, that I can remember for sure.