Knots in electromagnetism