First Letter Selector

The ::first-letter selector is used to add a style to the first letter of the specified selector.


Note: The following properties can be used with ::first-letter

  • font properties
  • color properties
  • background properties
  • margin properties
  • padding properties
  • border properties
  • text-decoration
  • vertical-align (only if float is 'none')
  • text-transform
  • line-height
  • float
  • clear


Note: The ::first-letter selector can only be used with block-level elements.