White dwarfs exhibit spectra similar to the Sun primarily due to their comparable temperatures, which can be around 10,000 degrees. The Sun, classified as a yellow dwarf, is on a path to becoming a white dwarf in several billion years, while white dwarfs are remnants of stars that have exhausted their nuclear fuel. Although both share spectral similarities, white dwarfs typically show broader hydrogen lines compared to the Sun's weaker and narrower lines, along with distinct sodium, calcium, and iron lines present in the Sun's spectrum. The light observed from both types of stars originates from their outer gas layers, highlighting their temperature similarities. Overall, while their spectra have similarities, the internal structures and conditions of white dwarfs and the Sun are fundamentally different.