If you have a piece of matter in front of you, how can you know of which atoms it consists? And starting from nothing, how can I discover all the elements (or just a lot of them) of the periodic table?
I can imagine some unefficient methods based on atom's characteristics (e.g. heat the matter till it becomes a gas, then calculate it's spectrum; weigh and compare pieces of the matter very accurately to "discover" the quanta of mass; ...), but all those methods seem quite theoretical/impossible. Moreover, when people started tabling the atoms (end of the 19th century), things like the spectrum of an atom weren't even known yet.
Or is it all done by chemical reactions, and then comparing the ratios of the compounds and their masses? This seems for me the most obvious way to tackle the problem, although it still looks like a very hard job to determine all possible elements like that experimentally (>100 years ago, or even now if I had to do it myself in some kind of way). I cannot imagine having all the elements in my daily neighbourhood right know, to start experimenting with them and "discovering" them.
Measuring characteristics like the boiling point etc. doesn't seem to be a good idea either, because you don't know whether you're dealing a mono-atomic specimen or a compound.
So my question is actually twofold: how did people manage to discover them more than 100 years ago (historically), and how can I do it myself now (practically)?