Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

first letter

The first-letter pseudo-element selector will target the first letter of a text node within elements.
Syntax Logicelement::first-letter { property_list }

CSS Code Example

<style> p::first-letter { font-size: 24px; color: #09C; } </style> <p>Once upon a time on a website...</p> <p>Later that same afternoon a great big...</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