HTML is case-insensitive and therefore the casing of event handler names in your HTML documents is irrelevant. E.g. you can use onclick
, ONCLICK
, onClick
or even oNcLiCk
for your event handler name. However, XHTML is not so liberal and stipulates that all event handler names should be lowercase (e.g. onclick=”…”
). Therefore, to make your HTML pages XHTML compliant, always use lowercase event handler names.