CSS ::first-letter Selector Last Updated : 11 Jul, 2025 Comments Improve Suggest changes 1 Likes Like Report 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:background propertiesborder propertiesclearcolor propertiesfloatfont propertiesline-heightmargin propertiespadding propertiestext-decorationtext-transformvertical-align (only if the float is 'none')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 <!DOCTYPE html> <html> <head> <style> p::first-letter { font-size: 250%; color: green; } </style> </head> <body style="text-align: center;"> <h1 style="color:green;"> CSS ::first-letter selector </h1> <p>Geeks classes is an extensive classroom programme.</p> </body> </html> Output:Supported Browsers: The browser supported by ::first-letter selector are listed below: Google Chrome 1.0Firefox 1.0Microsoft Edge 12.0Safari 1.0Opera 7.0 Partial from 3.5Internet Explorer 9.0 Partial from 5.5 Create Quiz Comment V Vishal Chaudhary 2 Follow 1 Improve V Vishal Chaudhary 2 Follow 1 Improve Article Tags : Web Technologies CSS CSS-Selectors Explore CSS Introduction 3 min read CSS Syntax 3 min read CSS Selectors 6 min read CSS Comments 2 min read CSS Colors 5 min read CSS Borders 5 min read CSS Margins 4 min read CSS Height and Width 4 min read CSS Outline 4 min read CSS Fonts 4 min read Like