Some time again, our man Geoff Graham handled us to a refresher on the CSS initial-letter
property, however how will you fashion drop and preliminary caps to mirror a model’s visible id and assist to inform its tales?
Right here’s how I do it in CSS by combining ::first-letter
and initial-letter
with different sudden properties, together with border-image
, and clip-path
.
My temporary: Patty Meltt is an up-and-coming nation music sensation, and she or he wanted an internet site to launch her new album. She wished it to be distinctive-looking and memorable, so she referred to as Stuff & Nonsense. Patty’s not actual, however the challenges of designing and creating websites like hers are.
First, a drop cap recap. Chris Coyier wrote about drop caps a number of years in the past. They’re an ornamental letter at first of a paragraph, usually spanning a number of strains of textual content. It’s a typographic flourish present in illuminated manuscripts and conventional ebook design, the place it provides visible curiosity and helps information a reader’s eye to the place they need to start.
Research manuscripts from the Center Ages onwards, and also you’ll discover hand-decorated illuminated capitals. The artists who made these preliminary letters have been fabulously referred to as “illuminators.” These medieval versals went past displaying somebody the place to start out studying; historiated letters additionally illustrated the tales, which was particularly helpful since most individuals within the Center Ages couldn’t learn.

On the internet, drop caps can enhance readability and mirror a model’s visible id.
A short refresher on properties and values
In CSS, drop caps are created utilizing the ::first-letter
pseudo-element together with initial-letter
. As you may anticipate, ::first-letter
targets the very first letter of a block of textual content, enabling you to fashion it independently from the remainder of a paragraph. The primary quantity units what number of strains tall the letter seems, and the second controls its baseline alignment — that’s, which line of textual content the underside of the cap sits on.
p::first-letter {
-webkit-initial-letter: 3 3;
initial-letter: 3 3;
}
As a result of browser help nonetheless varies, it’s widespread to incorporate each the unprefixed and -webkit-
prefixed properties for max compatibility. And talking of browser help, it’s additionally smart to wrap the initial-letter
property inside an @helps
CSS at-rule so we will examine for browser help and supply a fallback, if wanted:
@helps (initial-letter:2) or (-webkit-initial-letter:2) {
p::first-letter {
-webkit-initial-letter: 3 3;
initial-letter: 3 3;
}
}
The initial-letter
property mechanically calculates the font dimension to match the variety of strains a drop cap spans. By itself, this could make for fairly a primary impression. Nevertheless, drop caps actually begin to come to life if you mix initial-letter
with different CSS properties.
Tip: Interactive examples from this text are accessible in my lab.
Shadows

After I need to raise a drop cap off the web page, I can add a single text-shadow
. Shadows may be vibrant and don’t need to be black. I created a full stay demo you possibly can take a look at.
p::first-letter {
/* ... *//
text-shadow: 6px 6px 0 #e6d5b3;
}
However why use only one shadow when two hard-edged shadows will flip a cap right into a basic graphic typographic aspect?
p::first-letter {
/* ... */
text-shadow:
-6px -6px 0 #7d6975,
6px 6px 0 #e6d5b3;
}

Strokes

The text-stroke
property — shorthand for text-stroke-width
and text-stroke-color
— provides a top level view to the centre of the textual content form. It’s a Baseline characteristic and is now broadly accessible. I could make the cap textual content clear or color it to match the web page background.
p::first-letter {
/* ... */
text-stroke: 5px #e6d5b3;
}
Backgrounds

Including a background is an easy approach to begin making a cap extra ornamental. I might begin by including a strong background-color
.
p::first-letter {
/* ... */
background-color: #97838f;
}
So as to add a lighting impact, I might apply a conical, linear, or radial gradient background picture (right here’s a demo):
p::first-letter {
/* ... */
background-color: #e6d5b3;
background-image: linear-gradient(135deg,#c8b9c2 0%, #7d6975 50%);
}
And even a picture URL to make use of a bitmap or vector picture as a background (and right here’s that demo):
p::first-letter {
/* ... */
background-color: #e6d5b3;
background-image: url(...);
background-size: cowl;
}
Issues develop into much more fascinating by clipping a bitmap, gradient, or vector background picture to the textual content whereas setting its color to clear
. Now, the picture will solely seem contained in the textual content area (demo).
p::first-letter {
/* ... */
background-clip: textual content;
coloration: clear;
}
Borders

You may suppose borders are boring, however there’s lots you are able to do to make them look fascinating. I might begin by making use of a strong border
to encompass the cap field (demo).
p::first-letter {
/* ... */
border: 5px strong #e6d5b3;
}
Then, I might apply border-radius
to barely spherical all its corners (demo).
p::first-letter {
/* ... */
border-radius: 1rem;
}
Or, I would spherical particular person corners for a extra fascinating look (demo):
p::first-letter {
/* ... */
border-top-left-radius: 3rem;
border-bottom-right-radius: 3rem;
}

After which there’s the border-image
property, a strong, but usually ignored CSS software. By slicing, repeating, and outsetting pictures, you possibly can create intricate borders and ornamental drop caps with minimal code.

You possibly can insert a bitmap or vector format picture, or drop a CSS gradient into the border area:
p::first-letter {
/* ... */
border-style: strong;
border-width: 10px;
border-image: conic-gradient(...) 1;
}
Clipping
The clip-path
property enables you to outline a customized form that controls which elements of a component are seen and that are hidden. As a substitute of all the time displaying an oblong field, you need to use clip-path
to crop parts into circles, polygons, and even advanced shapes outlined with SVG paths. It’s an efficient approach to create visible results like this right-facing arrow. Clipping the drop cap into an arrow form isn’t simply ornamental — it reinforces course and hierarchy, actually pointing readers to the place the story begins. Right here’s a demo of the next instance.
p::first-letter {
/* ... */
padding-inline: 1rem 2rem;
background-color: #e6d5b3;
clip-path: polygon(...);
}
Or a shiny sticker form cap, made by combining clip-path
with a gradient background picture and a textual content shadow (demo).
Transforms

You possibly can remodel
a drop cap independently from the remainder of a paragraph by rotating, scaling, skewing, or translating it to make it really feel extra dynamic:
p::first-letter {
/* ... */
margin-inline-end: 2.5em;
remodel: skew(20deg, 0deg);
}

And with slightly trial and error to reach on the appropriate values, you possibly can even circulation the remaining paragraph textual content across the cap utilizing the shape-outside
property (demo):
p::first-letter {
/* ... */
show: block;
float: left;
shape-outside: polygon(0 0, 0 200px, 250px 600px);
shape-margin: 50px;
remodel: skew(20deg, 0deg) translateX(-60px);
}
Drop caps don’t simply assist information a reader’s eye to the place they need to start; additionally they set the tone for what follows. A well-designed drop cap provides visible curiosity at the beginning of a block of textual content, drawing consideration in a method that feels intentional and designed. As a result of it’s usually the primary aspect the reader sees, caps can carry lots of visible weight, making them highly effective instruments for expressing a model’s id.
Designing for Patty Meltt
Patty Meltt wished an internet site full of design particulars. Each aspect added to a design is a chance to be expressive, and that features her drop caps.
Her biography web page is presentable, however we felt a concentrate on the place somebody ought to begin studying was missing.

From the number of designs I confirmed her, she felt the sticker-style cap finest suited her model.

To implement it, first, I added a cursive typeface which matches her branding and contrasts with the remainder of her typographic design:
p::first-letter {
font-family: "Lobster Two", sans-serif;
font-weight: 700;
}
I modified the cap color to match the web page background and added a semi-transparent textual content shadow:
p::first-letter {
/* ... */
coloration: #140F0A;
text-shadow: 6px 6px 0 rgba(163,148, 117, .8);
}
Subsequent, I clipped the cap field to a visual space formed like a sticker:
p::first-letter {
/* ... */
clip-path: polygon(...);
}
…earlier than making use of two background pictures — a noise-filled SVG and a radial gradient — that I blended utilizing a background-blend-mode
:
p::first-letter {
/* ... */
background-image: url(img/cap-noise.svg),
radial-gradient(circle, #e6d5b3 0%, #cdaa65 100%);
background-blend-mode: soft-light, regular;
}

The result’s a drop cap that’s as fashionable as cut-off denims and a pair of gator-skinned boots.
Conclusion
Styling drop caps isn’t nearly ornament — it’s about setting a tone, drawing readers in, and utilizing each element to specific a model’s voice. CSS has the instruments to transcend the default: gradients, textures, borders, and even advanced shapes all assist remodel first letters into statements. So don’t waste the alternatives that drop caps offer you. Make ’em sing.