This is a British butterfly, the silver-washed fritillary. How do butterflies know that they have landed on the right flower?

They have taste buds (chemo-receptors) on their feet (tarsi)