Suggest an editImprove this articleRefine the answer for “Where do ::before and ::after sit in the flow?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**`::before`/`::after`** are pseudo-elements that are child elements of the selected node and by default sit inside the element, outside its main text: `::before` before the content, `::after` after it. **Key point:** both participate in the flow as regular inline elements unless `display` is changed, and neither renders without the `content` property.Shown above the full answer for quick recall.Answer (EN)ImageBoth pseudo-elements, `::before` and `::after`, **are child elements of the selected node** and by default sit **inside the element, but outside its main text**: - `::before` is inserted **before the element's content** - `::after` is inserted **after the element's content** At the same time, they: - participate in the flow **as regular inline elements**, unless `display` is changed - are not rendered without `content` - can be turned into blocks, absolutely positioned, etc., if the corresponding properties are set **Summary:** both pseudo-elements sit *inside the element in the DOM flow, but around its main content*: `::before` before it, `::after` after it.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.