If you were to look at unwound DNA/RNA string, you would know what I mean when I call it a ladder. The steps in between are the BASES. It is weird that despite being named “acids” DNA/RNA have bases in them, but the reason behind their names shall be discussed later.
Nitrogenous bases are called so because of the presence of lone pair electrons present on the nitrogen atoms. These electrons are capable of drawing H+ ions towards themselves from aqueous solutions, making them basic. (proton acceptors are bases)

Nucleic acids have 5 different types of N-bases, which are classified into 2 types: Purines and Pyrimidines. Purines have a double-ring structure whereas pyrimidines are known for single ring structures.

Uracil is a nitrogenous base found only in RNA. It forms hydrogen bonds with adenine. Production of uracil takes up lesser energy as compared to thymine, hence it is used in RNA.
When it comes to DNA, thymine is used. The reason behind this might be the need to prevent any kinds of errors and quickly detect mutations and problems in the strand. How? Cytosine, on degrading chemically, forms uracil. Had uracil been a part of DNA, such degradations would have gone unnoticed. Thus thymine is used in DNA, since it is the primary genetic material, and unlike RNA, slight mutations can cause drastic effects on the organism.
BONDING BETWEEN BASE PAIRS: Bonding between the N-base pairs is done with the help of Hydrogen bonding. There is a development of partial charges due to the electronegativity differences in nitrogen, hydrogen, oxygen and carbon. This leads to attraction between opposite charges and bond formation.
