CSS3 > Selectors

Before selector in CSS3

How to insert content before selected element(s) in CSS3?

By using Before selector we can place the content before selected element(s).

        b::before {
            content: " Sheo Narayan - ";

        h3::before {
            color: green;
            content: "S Narayan - ";

    <b>The Founder of</b>
    <h3>The CEO of SNIT Funda Service LLP</h3>

In the above code snippet, style is applied to the <b> tag and <h3> tag.


 Views: 740 | Post Order: 9

Write for us