A boy has been taken to hospital with burns after attempting to break wind and set fire to the fumes.