Skip to content
Related Articles
Open in App
Not now

Related Articles

CSS | ::after Selector

Improve Article
Save Article
  • Difficulty Level : Expert
  • Last Updated : 23 Aug, 2022
Improve Article
Save Article

::after selector is used to add same content multiple times after the content of other elements. This selector is same as ::before selector. 



Below HTMl/CSS code shows the functionality of ::after selector : 


<!DOCTYPE html>
        p::after {
            content: " - Remember this";
            background-color: blue;
    <h3>After Selector</h3>
    <p>User ID: @dmor1</p>
    <p>Name: dharam</p>



Supported Browsers

  • Google Chrome 1.0
  • Edge 12.0
  • Firefox 1.5
  • Safari 4.0
  • Opera 7.0

Note: Opera 4-6 supports with single-colon.(:after)

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!