Using ::after selector to insert text after the content of each <p> element - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:after

Description

Using ::after selector to insert text after the content of each <p> element

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<style>
p::after {<!--  ww w.j  a va2  s  .  c  om-->
    content: " - added content";
}
</style>
</head>
<body>

<p>this is a test</p>
<p>this is another test</p>
</body>
</html>

Related Tutorials