I came across an impressive stand of Musk Thistle (Carduus nutans) earlier this week that was heavily infested with Meadow Spittlebug (Philaenus spumarius). Flower stalks of this biennial weed are currently bolting from the rosette stage. Virtually every thistle stem appeared to be festooned with the tell-tale frothy, spittle-like masses characteristic of this and other spittlebugs. The frothy masses are produced by spittlebug nymphs (family Aphrophoridae); adults of these insects are called "froghoppers."
Spittlebug nymphs are found embedded within their frothy mass. The foamy "spittle" serves several functions including keeping the nymphs moist and protecting them from predators and parasitoids. Despite their common name, the bubbly mass is not produced by the nymph's mouth; it arises from the other end.