CSS - Pseudo Element Selector

CSS Pseudo Element Selector

This selector, selects specific part of an element.

  • It is denoted by the element, followed by two colons ( :: ) and the part of that element.

It can also be used to insert new content, before and after an element.

Pseudo Elements

SELECTORS DESCRIPTION
::after

Insert something after the content of an element.

::before

Insert something before the content of an element.

::first-letter

Select the first letter of the content of an element.

::first-line

Select the first line of the content of an element.

::marker

Select the markers of list item element.

::selection

Select the portion of an element selected by the user.

ADVERTISEMENTS

LEARNING IS A CONTINOUS PROCESS - PRACTICE MAKES PERFECT