The locator is nothing but an address that identifies a web element uniquely within the webpage. Thus, to identify web elements accurately and precisely we have different types of locators in Selenium as follows:
ID
ClassName
Name
TagName
linkText
PartialLinkText
Xpath
CSS Selector
DOM