Warm dense matter (WDM), a kind of transition state of matter between cold condensed matter and high temperature plasma, is one of the main research objects of high energy density physics (HEDP). Compared with the structure of isolated atom, the electron structure of WDM will change significantly because of the influences of density and temperature effect. As WDM is always strongly coupled and partly degenerate, accurate theoretical description is very complicated and the accurate experimental research is also very challenging. In this paper, the density effect on the warm dense matter electron structure based on the X-ray fluorescence spectroscopy is studied. The warm dense titanium with density larger than solid density is produced experimentally based on a specially designed hohlraum. Then, the titanium is pumped to emit fluorescence by using the characteristic line spectrum emitted by the laser irradiating the pump material (Vanadium). The X-ray fluorescence spectra of titanium with different states are diagnosed by changing the delay time between the pump laser and drive laser. The experimental fluorescence spectrum indicates that the difference in energy between
${\mathrm{K}}_{\text{β}} $
and
$ {\mathrm{K}}_{\text{α}} $
(
$\Delta E_{{\mathrm{K}}_{\text{β}}\text{-}{\mathrm{K}}_{\text{α}}}$
) of the compressed titanium (7.2–9.2 g/cm
3, 1.6–2.4 eV) is about 2 eV smaller than that of cold titanium. Two theoretical methods, i.e. finite-temperature relativistic density functional theory (FTRDFT) and two-step Hartree-Fock-Slater (TSHFS), are used to calculate the fluorescence spectrum of warm dense titanium. The calculated results indicate that the energy difference (
$\Delta E_{{\mathrm{K}}_{\text{β}}\text{-}{\mathrm{K}}_{\text{α}}} $
) decreases with the increase of density but changes slowly with the increase of temperature during the calculated state (4.5–13.5 g/cm
3, 0.03–5 eV). The FTRDFT overestimates the density effect on the line shift, while TSHFS underestimates the density effect. The future work will focus on optimizing the experimental method of X-ray fluorescence spectroscopy, obtaining X-ray fluorescence spectrum of titanium with more states, and then testing the theoretical method for warm dense matter.