Nucleic acids are explained as long-chain polymeric molecules, where the monomer (the repeating unit) is referred to as the nucleotides. Thus many times nucleic acids are referred to as polynucleotides. The two main kinds of nucleic acids are-
Chemically, DNA is a composition of a pentose sugar, phosphoric acid, and some cyclic bases that have nitrogen in them. DNA has β-D-2-deoxyribose in it, in the form of the sugar moiety.
The RNA molecule is a composition of phosphoric acid, a pentose sugar, and some cyclic bases containing nitrogen. The sugar moiety inside RNA molecules is β-D-ribose.