I have heard that ID is unique and can only be used once in a page, but its working fine when used over multiple times on a page. Please let me know the purpose of ID and hows i
You have heard correctly. The behavior you are seeing is the result of browsers being coded to be extremely accommodating in the face of gross violations of the HTML standard.
The idea behind the fact that they have been coded to work even when presented with "bad" data is that, to less technically proficient users, it's the browser's fault if something does not work. Browsers were forced to work with tag soup, and this is the logical extension.