Web design & UX

Typography in web design – 9 rules that will change the look of your website

Text
Contents

All the pretty websites you see on Behance or Awwwards have one thing in common: well-chosen typographyThat's 80% of successful design—colors, animations, and layout come later. I'll show you 9 principles we apply in every websky-studio.pl/ project.

In short

  • Typography = 80% of the design experience. Poor fonts = amateur site, regardless of the rest.
  • Maximum 2 fonts per page. 3 is an exception for very complex projects.
  • Polish market: check the diacritics ą, ę, ł, ń — most Western fonts draw them badly.
  • Performance: locally hosted font + font-display: swap = no FOUT/FOIT.

1. Font pairing - maximum 2 families

The most common amateur design mistake: 4 different fonts on the home page. It looks chaotic.

The 2 Font Rule

  • Heading font — expressive, characterful (display, sans-serif with personality)
  • Body font — legible, neutral (sans-serif or serif)

Sometimes it's worth adding 3. font for accents (e.g. monospace for quotes or numbers), but this is an exception.

Proven pairs

Classic and safe:
– Headings: Inter (sans-serif, great PL)
– Bodysuit: Inter (the same, lighter weight)

With character:
– Headings: Playfair Display (serif with elegance)
– Bodysuit: Inter (clean sans-serif)

Modern:
– Headings: Space Grotesque (geometric sans)
– Bodysuit: Inter or DM Sans

Premium / Luxury:
– Headings: Cormorant Garamond (classic serif)
– Bodysuit: Manrope (modern sans)

When 1 font is enough

Increasingly in 2026: one font with a wide set of weights (Light, Regular, Bold, Black). The page looks consistent.

Recommended mono-font solutions:
– Inter (full range)
– Manrope
– Plus Jakarta Sans
– Geist (from Vercel, popular in 2026)

2. Size Hierarchy - Type Scale

Don't use random sizes (12, 14, 16, 18, 22, 26, 30, 38). Use type scale — proportional scale.

Classic 1.250 scale (Major Third)

ElementSize
Body small14 px
Body18 px (1.125 rem)
H420 px
H325 px
H231 px
H139 px
Display49 px

More Dynamic (1.333 - Perfect Fourth)

ElementSize
Body16 px
H421 px
H328 px
H237 px
H150 px
Display67 px

Scale generator: type-scale.com.

Mobile-first: scale down

The above scales are for desktop. Mobile (375 px) requires proportionally smaller dimensions:

h1 {
  font-size: 32px; /* mobile */
}
@media (min-width: 768px) {
  h1 {
    font-size: 50px; /* desktop */
  }
}

3. Line-height - choose the right one

Line-height (leading) to space between lines of textThe most common error: too small (dense text) or too large (lines "flowing separately").

Recommended values:

  • Headings (large): 1.0–1.2 (tight, dramatic)
  • Headings (mid): 1.2–1.3
  • Body text: 1.5–1.6 (best readability)
  • Captions / small: 1.3–1.4
body {
  font-size: 18px;
  line-height: 1.6; /* 28.8 px */
}

h1 {
  font-size: 50px;
  line-height: 1.1; /* 55 px */
}

4. Line length - 45–75 characters

Best readability: 45–75 characters per lineShorter (30) = eyes jump too often. Longer (90+) = eyes miss the start of the next line.

Converting to CSS

Safe text container width on desktop:

.article-content {
  max-width: 65ch; /* 65 characters */
  margin: 0 auto;
}

Unit ch = the width of the “0” character in the current font. It's more semantic than max-width: 720px.

5. Contrast - Readability = WCAG

WCAG 2.2 AA Requirement: contrast at least 4.5:1 for text < 18 pt.

Most common mistakes:

❌ Gray text on a white background — #999 on #FFF = 2.8:1 (FAIL)
✅ #666 on #FFF = 5.7:1 (OK)
✅ #444 on #FFF = 9.7:1 (great)

❌ Light on light accent color
❌ Background darkening too early in hero video (text disappears)

Tester:

WebAIM Contrast Checker — enter the hex for the background and text.

6. Polish Diacritics - Check Each Font

Most western fonts have imprecisely drawn Polish characters:

  • ą looks like "a with a weird line"
  • ł is too thin or too thick
  • ż, ź, ć they have dots/lines outside the font band

Test:

Write a paragraph with all Polish characters:

"The bile of the gusli. The caretaker pushed the bone into the quiz of the gusli or fax car wash."

Read. Does it look consistent? Are ą and ę the same weight as a and e?

Fonts with good Polish characters:

  • Inter (Google, free)
  • DM Sans / DM Serif (Google)
  • Manrope (Google)
  • Plus Jakarta Sans
  • TWK Lausanne (premium)
  • Caros / Capitalics (Polish foundries, premium)

7. Font weights - use only what you need

Each additional font weight = additional file to download. Inter in 9 weights is 9 files × 100 KB = 900 KB.

Principle of minimum:

Most often it is enough 3 scales:
– 400 (Regular) — body
– 500 or 600 (Medium/SemiBold) — Honorable Mentions
– 700 (Bold) — headings

In Google Fonts, select just these 3 and it will take 60% less time to download.

8. Performance — local fonts + font-display

Host fonts locally

Google Fonts via <link> = 2 external requests + Google dependency. Better:

  1. Download font from google-webfonts-helper.herokuapp.com
  2. Upload to the server (/fonts/inter/)
  3. Add @font-face in CSS:
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

font-display: swap — crucial!

Without font-display: swap browser waits 3 seconds to download the font, showing blank text. This FOIT (Flash of Invisible Text) - Corrupts LCP and Lighthouse.

font-display: swap says: “show the text immediately in a system font, then swap in the web font once it loads.” This FOUT (Flash of Unstyled Text) - faster, better.

Preload key fonts

<link rel="preload" href="/fonts/inter/Inter-Regular.woff2" as="font" type="font/woff2" crossorigin>

This tells the browser, "Download this font as a priority, even before parsing the CSS."

9. Typographic details - kerning, ligatures, fluid type

Kerning

Some letter combinations (AV, To, We) look bad with the default kerning. Turn on auto:

body {
  text-rendering: optimizeLegibility;
  -webkit-font-feature-settings: "kern";
  font-feature-settings: "kern";
}

Ligatures

Some fonts have beautiful ligatures (combinations of "fi", "fl", "ffi"). Enable:

body {
  font-feature-settings: "liga", "kern";
}

Fluid typography (clamp)

Instead of media queries for each breakpoint:

h1 {
  font-size: clamp(32px, 5vw, 64px);
}

That is: minimum 32 px, maximum 64 px, in the middle scaled proportionally to the window width.

Example of a complete typography configuration

/* Reset */
html { font-size: 16px; }

/* Body */
body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.125rem;  /* 18px */
  line-height: 1.6;
  color: #333;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga";
}

/* Headings */
h1, h2, h3, h4 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: #111;
}

h1 { font-size: clamp(32px, 5vw, 56px); }
h2 { font-size: clamp(28px, 4vw, 42px); }
h3 { font-size: clamp(22px, 3vw, 32px); }
h4 { font-size: clamp(18px, 2.5vw, 24px); }

/* Article content */
article {
  max-width: 65ch;
  margin: 0 auto;
}

article p { margin-bottom: 1.5rem; }

What's next

This week:

  1. Open your website and check if you are using max 2 fonts?
  2. Check the contrast of all texts (WebAIM)
  3. Check Polish diacritics (Zażółć gęśli jaźń)
  4. Check font-display: swap in CSS
  5. Check the body line-height (should be 1.5–1.6)

We do redesigns with a special emphasis on typography — in the basic package you get a well-selected font system + typographic audit of the existing website. Check the offer.

Your feedback

Was this article helpful?

One click — it helps me choose future topics.

Share article

Websky Newsletter

New posts straight to your email.

Once a month — practical insights on WordPress, WooCommerce, SEO and AI. No spam, unsubscribe with one click.

  • Case studies from Polish projects
  • Checklists and templates to download
  • Google and WordPress changes in a nutshell

Your data goes to Websky Studio only. You can unsubscribe with one click in every message.

Web design & UX

Design that leads to the click.

Typography, grid, and page rhythm built around a single goal: so customers instantly know where to click and what to buy.

See website offer