I have 2 questions:
As W3C can we add onclick inside
<li>
tag?Will this affect anything to do with SEO?
For example:
<li onclick="newDoc()">Click!</li>
function newDoc() {location.assign("http://validator.w3.org/");}
As far as I know, inline JavaScript is a no no. You seperate your HTML, PHP, CSS and JS files into different files. Inline styling/coding only makes bad maintainable code. You'll forget where you did what, and debugging will become a pain in the ass.
For SEO, if your pages are HTML(x/5) valid, no problems. As long as you don't expect them to run JavaScript (e.g.: show content only after click).
Yes, there are some situations where inline style/coding is OK, but they're exceptions.