HTML5 and possibly earlier HTML versions specify a method to store data locally (as file, or database). Cookies and session data have been around a while.
And yes, they can track you to some extent. If they couldn't none of their free services would be free. They sell ads based on who you are, what you like to do and what you search for.