Wilhelm Roentgen discovered x-rays in 1895 when he observed that a fluorescent screen glowed near a cathode ray tube. He found that x-rays are produced when electrons collide with a metal target in a vacuum tube. There are two types of x-ray spectra produced: continuous spectra which has a range of wavelengths, and characteristic spectra which consists of peaks produced by electronic transitions within atoms. X-rays can diffract when they interact with the periodic planes of atoms in a crystal according to Bragg's law. The wavelength is determined by the spacing between planes and the diffraction angle. Moseley's law describes the relationship between an element's atomic number and the wavelength of its spectral lines.