Nucleic acids are polymers of nucleotides in which the 5' oxygen of one nucleotide is linked to the 3' oxygen of another by means of a phosphate ester linkage, called a phosphodiester bond. DNA differs from RNA in that DNA lacks a hydroxyl group on the number two carbon of ribose.

The Watson and Crick model of DNA structure proposed the double helix in which adenine and thymine form a base pair connected by two hydrogen bonds while guanine and cytosine form a base pair with three hydrogen bonds. Base pairing allows DNA to serve as the template for its own replication as well as to serve as the template for protein biosynthesis. Base pairing allows for the complementary relationship of gene sequence with protein sequence (a triplet of adjacent nucleotides being a codon, standing for a single amino acid) mediated by mRNA and tRNA (although the relationship between the sequence of codons in DNA and the ultimate amino acid sequence in proteins can be complex, especially in eukaryotes, where the primary RNA transcript generally undergoes processing prior to translation on the ribosomes).