A nitrogen-containing base that is a component of a nucleotide.