Parambir.in

Things I Came Across…

Archive for the ‘event handler’ tag

onclick or ONCLICK or onClick?

without comments

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 event 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.

Written by Param

March 25th, 2010 at 11:38 am

Posted in HTML/XHTML,JavaScript

Tagged with