The moduli space of stable vector bundles on a Riemann surface is smooth when the rank and degree are coprime, and is diffeomorphic to the space of unitary connections of central constant curvature. A classic result of Newstead and Atiyah-Bott asserts that its rational cohomology ring is generated by the universal classes, that is, by the Kunneth components of the Chern classes of the universal bundle. This paper studies the larger, non-compact moduli space of Higgs bundles, as introduced by Hitchin and Simpson, with values in the canonical bundle K. This is diffeomorphic to the space of all connections of central constant curvature, whether unitary or not. The main result of the paper is that, in the rank 2 case, the rational cohomology ring of this space is again generated by universal classes. The spaces of Higgs bundles with values in K(n) for n > 0 turn out to be essential to the story. Indeed, we show that their direct limit has the homotopy type of the classifying space of the gauge group, and hence has cohomology generated by universal classes. A companion paper treats the problem of finding relations between these generators in the rank 2 case.