CSS Pseudo-elements

What are Pseudo-Elements?

A CSS pseudo-element is used to style specific parts of an element.

For example, it can be used to:

  • Style the first letter or line, of an element
  • Insert content before or after an element
  • Style the markers of list items
  • Style the viewbox behind a dialog box

Syntax

The syntax of pseudo-elements:

selector::pseudo-element {
property: value;
}

Continue reading CSS Pseudo-elements

CSS Pseudo-elements

What are Pseudo-Elements?

A CSS pseudo-element is used to style specific parts of an element.

For example, it can be used to:

  • Style the first letter or line, of an element
  • Insert content before or after an element
  • Style the markers of list items
  • Style the viewbox behind a dialog box

Continue reading CSS Pseudo-elements