mdo/code-guide

Attribute order for onclick event attributes

vanillajonathan opened this issue · 2 comments

The HTML attribute order section does not include the order of event attributes such as onclick, onblur, onchange, etc.

Might be due to usage of event attributes being discouraged.
From MDN:

You can find HTML attribute equivalents for many of the event handler properties; however, you shouldn't use these — they are considered bad practice. It might seem easy to use an event handler attribute if you are doing something really quick, but they quickly become unmanageable and inefficient.

Yes, but when you use an SPA such as React you would use event handlers such as onClick, onBlur, onChange, etc, or with Vue @click, @blur, @change, or with Angular (click), (blur), (change).