HTML forms are so broken.
With every other element, you can do this:
<div id="foo">
div.id // "foo"
Forms work the same way too:
<form id="bar">
form.id // "bar"
But then:
<form id="bar">
<input name="id">
form.id // the input element
🤡
I never liked attribute shorthands, I prefer .getAttribute('id') every time now that it’s supported. Things like .id is what I used because I had to, but now I view it as legacy API.