CSS ::firstletter Selector (original) (raw)

CSS ::first-letter Selector

Last Updated : 11 Jul, 2025

The ****::first-letter selector** CSS Pseudo-element is used to apply the style to the first letter of the first line of a block-level element, the condition is it should not be preceded by other content ( such as images or inline tables).

**Syntax:

::first-letter {
// CSS Property
}

**Accepted Properties:

**Example: This example illustrates the use of the ****::first-letter selector** where the color & font-size property is used to style the first letter.

HTML `

CSS ::first-letter selector

Geeks classes is an extensive classroom programme.

`

**Output:

firstselector

**Supported Browsers: The browser supported by ****::first-letter selector** are listed below: