Skip to content
Justice Tech School

Spacing and Shadows

line-height sets the space between lines; a unitless value like 1.6 scales with the font size. letter-spacing and word-spacing adjust gaps between characters and words.

text-shadow takes x offset, y offset, optional blur and a colour. Subtle shadows can help text stand out, but heavy ones hurt readability.

Example
<style>
  .read { line-height: 1.7; letter-spacing: 0.4px; max-width: 360px; }
  .glow { font-size: 36px; color: white; background: #1e293b; padding: 12px; text-shadow: 0 0 8px #22d3ee, 2px 2px 0 #0e7490; }
</style>
<p class="read">Comfortable line height and a little letter spacing make long paragraphs easier on the eyes.</p>
<div class="glow">Glowing text</div>

Exercise

Set the line height to 1.6 times the font size.

p {
  : 1.6;
}

Quiz Test

Which is the order of the first two text-shadow values?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.