Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

before

The before pseudo-element selector is used to generate content into the targeted elements directly before the content inside of them. Reference the CSS "content" property to see possible values of content types that can be generated, you can generate more than just string content.
Syntax Logicelement::before { content: generated_content ; }

CSS Code Example

<style> p::before { content: "String ... "; } </style> <p>paragraph content</p> <p>paragraph content</p> <p>paragraph content</p> <p>paragraph content</p>

CSS

Selectors

universaltypecompoundclassidnotattributedescendantchildadjacent siblinggeneral siblingfirst childlast childonly childfirst of typelast of typeonly of typenth childnth last childnth of typenth last of typeemptyrootfirst linefirst letterbeforeafterlinkvisitedhoveractivefocustargetenableddisabledcheckedlang