Sub topic 10
Pairing a heading font with a body font
This chapter assumes you can link a font from Google Fonts or an Adobe Fonts web project and write a font-family rule with fallbacks. It covers how to choose two typefaces that work together and how to load and apply them without wasting bandwidth.
Why pair fonts at all
Most pages use two typefaces: one for headings and one for body text. The heading font sets the tone. The body font has to stay readable at small sizes over long passages. Using one family for both is a valid choice, and often the safest one. A pair is worth the extra download only when it adds clear hierarchy or personality.
Rules of thumb for a good pair
A pair should look related but clearly different. Fonts that are almost alike look like a mistake. Fonts that are very different in mood look like a clash.
- Contrast one thing at a time. Pair a serif heading with a sans-serif body, or the reverse. Avoid pairing two fonts that differ in several ways at once.
- Match proportions. Compare x-height (the height of lowercase letters such as "x") and overall width. If they differ a lot, the body text will look larger or smaller than the headings suggest.
- Keep display fonts for headings. Decorative faces tire the eye in paragraphs. Use a plain, legible face for body text.
- Limit the count. Two families are enough for most sites. A third, such as a monospace font for code, should have a specific job.
- Check language support. Both fonts must cover the characters your content needs.
Example pairs
| Role | Heading | Body | Why it works |
|---|---|---|---|
| Editorial | Playfair Display (serif) | Source Sans 3 (sans-serif) | High-contrast serif headlines over a neutral sans |
| Product or app | Inter 700 | Inter 400 | One family, hierarchy through weight |
| Technical docs | Inter | Fira Code (monospace) | Monospace reserved for code samples |
All three families are in the Google Fonts catalog. For Adobe Fonts, you would pick equivalents from your web project and use the CSS names shown on its project page.
Loading a pair from Google Fonts
Request both families in one URL so the browser makes a single stylesheet request. List only the weights you use.
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Source+Sans+3:wght@400;700&display=swap" rel="stylesheet">Each family= parameter adds one family. Spaces in names become +. The display=swap parameter makes text visible in a fallback font while the web font loads.
Applying the pair in CSS
Assign each font to its role, and give each its own fallback stack. Choose fallbacks of the same category as the web font, so a serif falls back to a serif.
body {
font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
font-weight: 400;
line-height: 1.6;
}
h1, h2, h3 {
font-family: "Playfair Display", Georgia, "Times New Roman", serif;
font-weight: 700;
line-height: 1.2;
}Notice that headings get a tighter line-height than body text. Large type needs less leading than small type.
Loading a pair from Adobe Fonts
Add both fonts to the same web project. Then one stylesheet link serves both.
<link rel="stylesheet" href="https://use.typekit.net/your-project-id.css">h1, h2 {
font-family: "proxima-nova", Helvetica, Arial, sans-serif;
font-weight: 700;
}Use the exact CSS family names that the project page shows. They are often lowercase and hyphenated, and a typo means the browser silently uses the fallback.
Checking your pair
Two checks catch most problems.
- Network panel. In your browser's developer tools, filter by "Font". You should see only the files for the weights you use. Extra files mean you requested weights you never reference.
- Rendered fonts. In the Elements panel, open the Computed or Fonts tab for a heading and a paragraph. It lists the font actually used. If it shows your fallback, the web font did not load or the name does not match.
Common mistakes
- Requesting a weight in the URL that the CSS never uses, or using a weight the URL never requested. The browser then fakes bold by smearing the regular face, which looks poor.
- Choosing fallbacks with very different metrics, which causes a visible jump in layout when the web font arrives.
- Pairing two fonts that look similar but not identical.
- Using the heading font at small sizes, such as in captions, where its details are lost.
Exercise
Your page loads Playfair Display at weight 700 and Source Sans 3 at weights 400 and 700, but the CSS gives h1 a font-weight of 900. What happens, and how do you fix it?
Show answer
Weight 900 was not requested, so the browser uses the closest available file (700) or may synthesize extra boldness. The result differs from what you intended. Fix it by either setting h1 to font-weight 700, or adding 900 to the Google Fonts URL (for example wght@700;900) and confirming the family offers that weight.
Exercise
Name two properties to compare when deciding whether a heading font and a body font will look balanced together.
Show answer
Compare x-height and overall letter width. Large differences make one font look bigger or looser than the other at the same font size.