devxlogo

Add Text After a Particular HTML Element Using CSS

Add Text After a Particular HTML Element Using CSS

Use the :after selector to add text after the element. Please see below for an example.

If you want to add text, such as ‘Click the email link at the bottom of the page for feedback,’ at the end of every div, you would simply add the following in the CSS.

div:after{ content: "Click the email link at the bottom of the page for feedback";}
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist