On adding dilute H2SO4 for testing halogens in an organic compound with AgNO3, white precipitate of Ag2SO4 is formed. This will interfere with the test of chlorine and this Ag2SO4 may be mistaken for white precipitate of chlorine as AgCl. Hence, dilute HNO3 is used instead of dilute H2SO4.