Use text inside .after pseudo element to make appear text as the background. Output. Using .before pseudo elements. Using .before pseudo elements with .before pseudo elements having lower z-index value make it to appear as background. Use text inside .before pseudo element to make appear text as the background.