Genes are composed of nucleic acids, primarily DNA.