`el.className` and `el.htmlFor` have such unusual names because `class` and `for` used to be reserved words in JS. That hasn't been true for property names for 10+ years.
Firefox is experimenting with adding `el.class` and `el.for`, yay!
Add `class` & `for` aliases for `className` and `htmlFor` · Issue #9379 · whatwg/html
https://dom.spec.whatwg.org/#dom-element-classname https://html.spec.whatwg.org/multipage/forms.html#dom-label-htmlfor I assume these were originally given unusual and inconsistent names to avoid reserved words, but it isn't an issue wit...
GitHub (github.com)