And for completeness, if two fouls happen in quick succession, you punish both fouls. For example, a player is off the field for injury treatment, a promising attack in progress near the touchline, the injured player sticks his leg in and carelessly trips the runaway opponent, this is two yellow cards, one for entering without permission and another for SPA.