We study the structure of the category of graded, connected, countable-dimensional, commutative and cocommutative Hopf algebras over a perfect field k of characteristic p. Every p-torsion object in this category is uniquely a direct sum of explicitly given indecomposables. This gives rise to a similar classification of not necessarily p-torsion objects that are either free as commutative algebras or cofree as cocommutative coalgebras. We also completely classify those objects that are indecomposable modulo p.