I would like to know what is the difference between javascript:; and javascript:void(0); if I use them in href attribure for a>
I agree with David that neither should be used. The javascript pseudo-protocol can put the page into a waiting state in some browsers, which can have unexpected consequences. As one example, I spent hours trying to debug a web app that was crashing IE6 whenever someone clicked a javascript: link soon after the page loaded. It turned out that the page entering the waiting state was conflicting with a Flash movie trying to initialize. I solved the problem by replacing the link with one in this format:
Link
The "return false" prevents the link from actually being followed.