Nucleobases are nitrogen-containing biological compounds (nitrogenous bases) found linked to a sugar within nucleosides—the basic building blocks of deoxyribonucleic acid (DNA) and ribonucleic acid (RNA). Often simply called bases in genetics, their ability to form base pairs and to stack upon one another lead directly to the helical structure of DNA and RNA.
Use of the word base is historical, in reference to the chemical properties of nucleobases in acid-base reactions within the test tube, and is not especially important for understanding most of their biological functions.
The primary, or canonical, nucleobases are cytosine (DNA and RNA), guanine (DNA and RNA), adenine (DNA and RNA), thymine (DNA) and uracil (RNA), abbreviated as C, G, A, T, and U, respectively. Because A, G, C, and T appear in the DNA, these molecules are called DNA-bases; A, G, C, and U are called RNA-bases. Uracil and thymine are identical except that uracil lacks the 5' methyl group. Adenine and guanine belong to the double-ringed class of molecules called purines (abbreviated as R). Cytosine, thymine, and uracil are all pyrimidines (abbreviated as Y). Other bases, that do not function as normal parts of the genetic code, are termed non-canonical.
In normal spiral DNA the bases form pairs between the two strands: A with T and C with G. Purines pair with pyrimidines mainly for dimensional reasons - only this combination fits the constant width geometry of the DNA spiral. The A-T and C-G pairings are required to match the hydrogen bonds between the amine and carbonyl groups on the complementary bases.
The compound formed when a nucleobase forms a glycosidic bond with the 1' anomeric carbon of a ribose or deoxyribose is called a nucleoside, and a nucleoside with one or more phosphate groups attached at the 5' carbon is called a nucleotide.