Both deoxyribonucleic acid (DNA) and ribonucleic acid (RNA) are composed of nucleotides.DNA contains the sugar deoxyribose, while RNA contains the sugar ribose. DNA contains the nitrogenous base thymine, while RNA contains the nitrogenous base uracil.