A nucleotide is a building block of DNA or RNA. It consists of a nitrogen-containing base (adenine, guanine, cytosine, or thymine in DNA; adenine, guanine, cytosine, or uracil in RNA), a five-carbon sugar (deoxyribose in DNA or ribose in RNA), and a phosphate group.