ABSTRACT We analyse the IllustrisTNG simulations to study the mass, volume fraction, and phase distribution of gaseous baryons embedded in the knots, filaments, sheets, and voids of the Cosmic Web from redshift z = 8 to redshift z = 0. We find that filaments host more star-forming gas than knots, and that filaments also have a higher relative mass fraction of gas in this phase than knots. We also show that the cool, diffuse intergalactic medium [IGM; $T\lt 10^5 \, {\rm K}$, $n_{\rm H}\lt 10^{-4}(1+z) \, {\rm cm^{-3}}$] and the warm-hot intergalactic medium [WHIM; $10^5 \lt T\lt 10^7 \, {\rm K}$, $n_{\rm H} \lt 10^{-4}(1+z)\, {\rm cm^{-3}}$] constitute ${\sim } 39$ and ${\sim } 46{{\ \rm per\ cent}}$ of the baryons at redshift z = 0, respectively. Our results indicate that the WHIM may constitute the largest reservoir of missing baryons at redshift z = 0. Using our Cosmic Web classification, we predict the WHIM to be the dominant baryon mass contribution in filaments and knots at redshift z = 0, but not in sheets and voids where the cool, diffuse IGM dominates. We also characterize the evolution of WHIM and IGM from redshift z = 4 to redshift z = 0, and find that the mass fraction of WHIM in filaments and knots evolves only by a factor of ∼2 from redshift z = 0 to 1, but declines faster at higher redshift. The WHIM only occupies $4\!-\!11{{\ \rm per\ cent}}$ of the volume at redshift 0 ≤ z ≤ 1. We predict the existence of a significant number of currently undetected O vii and Ne ix absorption systems in cosmic filaments, which could be detected by future X-ray telescopes like Athena.