Law 11 Offside - Offence.
A player in an offside position is only penalised if, at the moment the ball touches or is played by one of his team, he is, in the opinion of the referee, involved in active play by:
• interfering with play or
• interfering with an opponent or
• gaining an advantage by being in that position.