First of all let me introduce you about element locators and why we need to use it. Element locators are useful to identifying GUI elements (button, link, textbox, dropdown, etc..) of HTML page. Selenium requires element locator to identify such elements to perform required action on that specific element.
There are many different types of element locators available and we will learn all of them one by one. To identifying element's id, you need to install Firebug in your Firefox browser. Generally selenium ID records
element id during recording time. We need to identify it manually when we are editing existing script or inserting new commands manually. You can get latest version of firebug for Firefox from here. Download and install it in your Firefox browser.