How are nitrogen bases in DNA held together?

The nitrogen bases bond A-T and C-G via hydrogen bonds. The bases are held together in the string by a backbone of alternating phosphate and sugar molecules.