  We extend the definition of hopfions to include a class of spin-$h$ fields
and use this to introduce the electromagnetic and gravitational hopfions of
different algebraic types. The fields are constructed through the Penrose
contour integral transform, thus the singularities of the generating functions
are directly related to the geometry of the resulting physical fields. We
discuss this relationship and how the topological structure of the fields is
related to the Robinson congruence. Since the topology appears in the lines of
force for both electromagnetism and gravity, the gravito-electromagnetic
formalism is used to analyze the gravitational hopfions and describe the time
evolution of their tendex and vortex lines. The correspondence between fields
of different spin results in analogous configurations based on the same
topological structure. The null and type N fields propagate at the speed of
light, while the non-null and type D fields radiate energy outward from the
center. Finally we discuss the type III gravitational hopfion, which has no
direct electromagnetic analog, but find that it still exhibits some of the
characteristic features common to the other hopfion fields.
