Maxwells equations allow for some remarkable solutions consisting of pulsed beams of light which have linked and knotted field lines. The preservation of the topological structure of the field lines in these solutions has previously been ascribed to the fact that the electric and magnetic helicity, a measure of the degree of linking and knotting between field lines, are conserved. Here we show that the elegant evolution of the field is due to the stricter condition that the electric and magnetic fields be everywhere orthogonal. The field lines then satisfy a `frozen field condition and evolve as if they were unbreakable filaments embedded in a fluid. The preservation of the orthogonality of the electric and magnetic field lines is guaranteed for null, shear-free fields such as the ones considered here by a theorem of Robinson. We calculate the flow field of a particular solution and find it to have the form of a Hopf fibration moving at the speed of light in a direction opposite to the propagation of the pulsed light beam, a familiar structure in this type of solution. The difference between smooth evolution of individual field lines and conservation of electric and magnetic helicity is illustrated by considering a further example in which the helicities are conserved, but the field lines are not everywhere orthogonal. The field line configuration at time t=0 corresponds to a nested family of torus knots but unravels upon evolution.