Answer:
In case of both DNA and RNA, in general it is the nucleotides.
Nucleotides basically consists of three parts. The sugar(deoxyribose in DNA and ribose in RNA, both of which are pentose sugars), nitrogenous base and a phosphoric acid group.
The only component that varies in the nitrogenous base. There are five different types.
1.Adenine(A)
2.Guanine(G)
3.Cytosine(C)
4.Thymine(T)
5.Uracil(U)
1 and 2 are known as purines.
3, 4 and 5 are known as pyrimidines.
In DNA, A base pairs with T by means of a double hydrogen bond and G pairs with C by means of a triple hydrogen bond.
In RNA, A base pairs with U by means of a double hydrogen bond and G pairs with C by means of a triple hydrogen bond.