Letter Spacing and Case

A popular look for small labels: tiny capital letters with a little extra space between them. Tiny capitals are easier to read when they aren't crowded:

Playful   Playful   Playful

You know uppercase from the previous lesson. These are all the classes for text-transform:

ClassCSS
uppercasetext-transform: uppercase
lowercasetext-transform: lowercase
capitalizetext-transform: capitalize
normal-casetext-transform: none

The space between letters (letter-spacing) is set by the tracking- classes; tracking is the printers' word for it:

Classletter-spacing
tracking-tighter-0.05em
tracking-tight-0.025em
tracking-normal0
tracking-wide0.025em
tracking-wider0.05em
tracking-widest0.1em

The unit em is like rem, but it is relative to the font size of the element itself: 1em is the element's own font size. So the space grows with the text: in 12-pixel text, tracking-wide adds 0.3 pixels after each letter, in 48-pixel text 1.2 pixels. Negative values move the letters closer together; big headings often look better with tracking-tight.

Instructions

Add the classes text-xs and uppercase to the "Playful" badge.

Add the class tracking-wide to the badge.

Start programming for free

By signing up, you agree to the Terms of Service and Privacy Policy.

Or sign up with:

8/10