According to time-dependent density functional theory, the exact exchange-correlation kernel f xc (n, q, ω) for wave vector q and frequency ω determines not only the ground-state energy but also the excited-state energies/lifetimes and time-dependent linear density response of an electron gas of uniform density n = 3/(4π r 3 s ). Here we propose a parametrization of this function based upon the satisfaction of exact constraints. For the static (ω = 0) limit, we modify the model of Constantin and Pitarke to recover at small q the known second-order gradient expansion, and to correct its approach to the large q limit. For all ω at q = 0, we use the model of Gross, Kohn, and Iwamoto. A Cauchy integral extends this model to complex ω. Scaling relations are identified. We then combine these ingredients, damping out the ω dependence at large q. Away from q = 0 and ω = 0, the correlation contribution to the kernel becomes dominant over exchange, even at r s = 4. The resulting correlation energies for 1 r s 10 from integration over imaginary ω are essentially exact. The plasmon pole of the density response function is found by analytic continuation of f xc to ω just below the real axis, and the resulting plasmon lifetime at r s = 4 is found for q < k F . A static charge-density wave is found for r s > 69, and shown to be associated with softening of the plasmon mode.