Nucleotides are the sub-units that make up DNA, and are made up of even smaller sub-units. The differences between these sub-units result in the unique base pairs that record genetic information and make up genes.
An individual nucleotide consists of a spine of sugar, a nucleobase containing nitrogen and a phosphate group attached to the sugar. The sugar always contains five carbon atoms. In DNA, the sugar is a pentose called deoxyribose, while in RNA, it is a pentose called ribose. The vertical sides of the DNA spiral are made up of long chains of these sugars, attached end-to-end. The nucleobases make up the rungs.
In DNA, the nucleobases are adenine, guanine, cytosine and thymine. Each nucleotide contains a single nucleobase which can be any of those four. The nucleotides, with their different nucleobases, always match up in pairs: adenine with thymine and guanine with cytosine.