Dear Student,
The butterfly is classified as a herbivorous insect because they feed on the nectar of flowers. Flowers are the products of plants. The organisms which depend on plants for their food are known as herbivores.
They belong to the Macrolepidoptera group of the order Lepidoptera.
Regards