This is just an example. You may have to adjust variables.
Here’s some HTML:
<p class="replaced">Original Text</p>
You want to replace “Original Text” with different content. Here’s how you can replace that text using only CSS.
.replaced { visibility: hidden; position: relative; } .replaced:after { visibility: visible; position: absolute; top: 0; left: 0; content: "This text replaces the original."; }
Website referenced:
https://www.geeksforgeeks.org/how-to-replace-text-with-css/