The nucleotides differ from each other because of their pentose sugar and of their nitrogenous bases like:
DNA RNA
pentose sugar ribose deoxyribose
nitrogenous bases A-T-G-C A-U-G-C
DNA RNA
A- adenine same
T- thymine U- uracil
G- guanine same
C- cytosine same