πŸ”  initial-letter β€” Beautiful Drop Caps in Modern CSS

🌐 What is initial-letter?

The initial-letter property allows you to create elegantdrop caps β€” enlarged first letters often seen in magazines, books, and editorial websites. You can control the size, depth, and styling of the first letter of a paragraph without manually wrapping it in extra HTML.

>>β€œinitial-letter brings typographic elegance to CSS β€” no extra markup required.”

Note

βœ” Supported in Safari, Chrome, Edge
βœ” Firefox support in progress
βœ” Works with block and inline elements

🎯 Why Use initial-letter?

  • Create professional editorial typography
  • Style drop caps without extra HTML wrappers
  • Control letter size relative to line height
  • Use raised or sunk styles
  • Perfect for blogs, magazines, articles, and long reads

πŸ“Œ Syntax

initial-letter Syntax

initial-letter: <size> <sink>?;

size β†’ how tall the letter is (in line units)sink β†’ how many lines the letter β€œdrops” into

πŸ“ How Drop Caps Work

PropertyDescription
sizeHeight of the letter measured in lines
sinkHow many lines the letter sinks down into

Note

πŸ’‘ The letter must be the first typographic character of the block.

πŸ§ͺ Example 1 β€” Classic Drop Cap

Classic Drop Cap

p::first-letter {
  initial-letter: 3;
}

Makes the letter approximately 3 lines tall.

πŸ§ͺ Example 2 β€” Drop Cap with Sinking

Drop Cap with Sink

p::first-letter {
  initial-letter: 3 2;
}

Letter is 3 lines tall but sinks only 2 lines deep.

πŸ§ͺ Example 3 β€” Styling the Drop Cap

Enhanced Styles

p::first-letter {
  initial-letter: 3;
  font-weight: bold;
  color: #c0392b;
  margin-right: 8px;
  float: left;
}

Adds color, spacing, and a classic drop-cap look.

🎨 Example 4 β€” Raised Initial Letter

Raised Initial Letter

p::first-letter {
  initial-letter: 2 0;
}

The letter rises above the baseline instead of sinking downward.

πŸ“ Example 5 β€” Using custom fonts

Custom Font Drop Cap

p::first-letter {
  initial-letter: 4 3;
  font-family: "Playfair Display", serif;
  color: #6a1b9a;
  margin-right: 10px;
}

Perfect for creating magazine-style typography.

🧠 How Browsers Calculate initial-letter

  • Letter height is measured using the line box height
  • Leading (spacing between lines) affects drop-cap shape
  • Margins around the first letter influence layout flow
  • Works only in combination with ::first-letter

πŸ“± Responsive Drop Caps

Responsive Drop Caps

@media (max-width: 600px) {
  p::first-letter {
    initial-letter: 2;
  }
}

@media (min-width: 900px) {
  p::first-letter {
    initial-letter: 4;
  }
}

Smaller drop caps on mobile, more dramatic ones on desktop.

⚠️ Common Mistakes

  • ❌ Forgetting to use ::first-letter β€” initial-letter won't work
  • ❌ Adding spaces or quotes before the first letter
  • ❌ Expecting it to work in Firefox (not fully supported)
  • ❌ Applying initial-letter to inline elements incorrectly

Note

🧠 The first letter must be a typographic character β€” punctuation may interfere.

πŸ”₯ Summary

initial-letter is a powerful CSS feature for creating beautiful, editorial-style drop caps. It makes typography richer without extra markup, giving designers fine-grained control over how the first letter interacts with the rest of the paragraph.

>>β€œWith initial-letter, polished magazine layouts are possible with just one line of CSS.”

Learn more β†’MDN Docs πŸ“˜