Big bang nucleosynthesis (BBN), describes the production of the light elements in the early universe. The theoretical prediction for the abundances of D, 3He, 4He, and 7Li is discussed and compared with their observational determination. The spectrum of anisotropies in the cosmic microwave background (CMB) now independently measures the baryon density to high precision. As a result, the CMB data test BBN. One finds that the CMB along with D and 4He observations paint a consistent picture. This concordance stands as a major success of the hot big bang. On the other hand, 7Li remains discrepant with the CMB-preferred baryon density; possible explanations are reviewed.