The Earth is considered to be a devolatilized piece of the solar nebula. Similarly, rocky exoplanets are most likely devolatilized pieces of the stellar nebulae out of which they and their host stars formed. If this is correct, we can estimate the chemical composition of rocky exoplanets by applying a devolatilization algorithm to the elemental abundances of their host stars. My PhD thesis was an investigation of this potentially universal devolatilization pattern, and is now being wrapped up with the following four major outcomes: i) the estimates of the bulk elemental abundances (with uncertainties) of the Earth by calibrating a variety of Earth observations and models; ii) the estimates of protosolar elemental abundances based on an improved combination of solar photospheric abundances and CI chondritic abundances; iii) quantification of the devolatilization pattern from the solar nebula to Earth by using the Earth-to-Sun abundances ratios as a function of elemental condensation temperatures; iv) application of the devolatilization algorithm to other planetary systems to estimate the bulk elemental composition of habitable-zone rocky exoplanets, and then to explore the interior composition and structure of such exoplanets and analyze their habitability. We mainly conclude that i) the Sun-to-Earth devolatilization pattern can be used as a first-order fiducial model of chemical relationships between rocky planets and their host stars, which provides a principal constraint to enhance the current studies of exoplanetary chemistry; ii) the interior composition and structure of terrestrial exoplanets orbiting different stars can be distinguished between each other, by using the current high-precision estimates of host stellar abundances (with a typical uncertainty less than 0.04 dex).