Do chemical compounds have spectral lines, or only elements? I know that elements (ex. Ag) have spectral/emission/absorption lines, but do chemical compounds (ex. NaCl) have spectral lines as well? Ones that when seen you can tell that that compound (NaCl) is made up of certain elements (Na and Cl).
Yes, but for "spectral lines" the gaseous state would generally be the implication. In solids and liquids photon interactions are generally over "bands" of energy not a very discrete wavelength as in a "spectral line."