Most of any interface is text: labels, buttons, headings, prices, error messages, help text. Good typography makes all of it easy to scan and read; poor typography makes even a well-planned product feel confusing. The good news is that UI typography is mostly about a few repeatable rules, not artistic talent.
Here are twelve typography rules for UI that cover the majority of decisions you will make. For the fundamentals, see the lesson typography for UI, and for the CSS side, CSS text and fonts.
Rule 1: Choose one or two typefaces, not five
One well-designed family with several weights is enough for most products. If you want contrast, pair one family for headings with another for body text, but make sure they differ clearly (for example a geometric sans for headings and a humanist sans or serif for body). Too many fonts look chaotic and slow down page loading.
For interfaces, choose fonts with: clear letter shapes (distinguish I, l and 1), a large x-height, several weights, good number shapes (tabular figures are a bonus for tables and prices), and support for every language you need.
Rule 2: Use a type scale
A type scale is a small, fixed set of sizes. Instead of picking 15, 17, 19 and 21 on different screens, you choose sizes from the scale. Many scales use a ratio, such as 1.2 or 1.25, between steps. Here is a practical example for a web app:
| Style name | Size (px) | Line height | Weight | Use |
|---|---|---|---|---|
| Display | 40 | 1.15 | Bold | Hero headings, rarely used |
| H1 | 32 | 1.2 | Bold | Page title |
| H2 | 24 | 1.25 | Semibold | Section titles |
| H3 | 20 | 1.3 | Semibold | Card titles, sub-sections |
| Body | 16 | 1.5 | Regular | Paragraphs, form inputs |
| Body small | 14 | 1.5 | Regular | Secondary information, table cells |
| Caption | 12 | 1.4 | Medium | Labels, meta data – use sparingly |
Save each step as a text style in Figma so the whole team uses the same set.
Rule 3: Start body text at 16px
16px is the default font size in browsers and a comfortable minimum for body text on both mobile and desktop. Going smaller for long paragraphs forces many users to zoom. Use 14px for secondary text and 12px only for short labels. In CSS, express sizes in rem so they respect the user’s browser settings; read CSS units: px, rem, em and vw.
Rule 4: Give body text room to breathe
Line height (leading) of about 1.4 to 1.6 works well for body text. Headings need less, around 1.1 to 1.3, because large text with wide line spacing looks disconnected. WCAG’s Text Spacing criterion (1.4.12) also requires that your layout still works if users increase line height to 1.5 times the font size and paragraph spacing to twice the font size, so avoid fixed-height containers for text.
Rule 5: Keep line length comfortable
Very long lines make it hard for the eye to find the start of the next line; very short lines break the reading rhythm. A widely used guideline is roughly 45 to 75 characters per line for body text. In CSS, max-width: 65ch on a text container is a simple way to achieve this.
Rule 6: Build hierarchy with more than size
Size is only one tool. You can also use weight, colour, spacing, case and position. Often the best hierarchy uses fewer, stronger differences: a heading that is both larger and bolder, followed by body text in a slightly lighter colour. Learn more in visual hierarchy.
| Tool | Example |
|---|---|
| Size | Price at 24px, product name at 16px |
| Weight | Label in semibold, value in regular |
| Colour | Primary text dark, metadata mid-grey (still passing contrast) |
| Spacing | More space above a heading than below it, so it belongs to the text that follows |
| Case | Short uppercase labels for small section tags (use sparingly; never for long text) |
Rule 7: Limit weights
Two or three weights (for example Regular 400, Medium 500 or Semibold 600, and Bold 700) are enough. Very thin weights such as 100 or 200 are hard to read at small sizes and on low-quality screens, which are common on budget phones.
Rule 8: Left-align most text
For left-to-right languages, left-aligned text gives a straight starting edge that the eye can return to easily. Centre alignment is fine for short headings, buttons and empty states, but not for paragraphs. Avoid justified text on the web: browsers can create uneven gaps between words (“rivers”), which hurt readability.
Rule 9: Support Indian scripts properly
If your product serves users in Hindi, Tamil, Telugu, Kannada, Malayalam, Bengali or other Indian languages, plan for it from the start:
- Choose a font family that covers the scripts you need, for example the Noto family, which has versions for many Indian scripts. Do not rely on the system to fall back unpredictably.
- Indic scripts often have taller ascenders, descenders and vowel marks than Latin. Increase line height for these languages so marks do not collide or get clipped.
- Translated text can be longer or shorter than English. Design buttons and labels with Auto layout so they grow with the text.
- Test with real translated content, not English placeholder text.
- Set the correct
langattribute in HTML (for examplelang="ta"for Tamil) so browsers and screen readers handle the text correctly.
Rule 10: Make numbers easy to compare
In tables, invoices and dashboards, use tabular (fixed-width) figures so digits line up in columns. In CSS this is font-variant-numeric: tabular-nums, if the font supports it. Right-align numeric columns, and format Indian amounts consistently, for example ₹1,25,000 using the Indian numbering system if your audience expects it.
Rule 11: Make text accessible
- Meet contrast requirements: 4.5:1 for normal text and 3:1 for large text (WCAG 1.4.3). See colour theory for UI designers.
- Allow text to be resized to 200% without loss of content (WCAG 1.4.4). Avoid fixed heights and use relative units.
- Use real text instead of images of text.
- Do not use all caps or italics for long passages.
- Use clear, plain language; good typography cannot rescue confusing words.
Rule 12: Test on real devices
Typography that looks perfect on a large, high-resolution monitor can feel cramped on a small Android phone held at arm’s length on a bus. Check your type scale on a real phone, in bright light, and with the system font size increased. Adjust before handoff, not after release.
Putting it into CSS
This small example applies several typography rules for UI at once: rem-based sizes, a simple scale, comfortable line height, limited line length and tabular numbers.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Type scale demo</title>
<style>
:root { font-size: 100%; } /* 16px by default */
body {
font-family: system-ui, "Segoe UI", Roboto, sans-serif;
font-size: 1rem;
line-height: 1.5;
color: #1f2937;
margin: 24px;
}
.content { max-width: 65ch; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 0.5rem; }
h2 { font-size: 1.5rem; line-height: 1.25; margin: 2rem 0 0.5rem; }
.meta { font-size: 0.875rem; color: #4b5563; }
table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
td { padding: 4px 12px; border-bottom: 1px solid #e5e7eb; }
td:last-child { text-align: right; }
</style>
</head>
<body>
<div class="content">
<h1>Monthly report</h1>
<p class="meta">Updated by Priya Raman, Coimbatore</p>
<p>Body text at 16px with a line height of 1.5 and a maximum width of about 65 characters is comfortable to read on most screens.</p>
<h2>Sales by city</h2>
<table>
<tr><td>Chennai</td><td>₹1,25,000</td></tr>
<tr><td>Madurai</td><td>₹98,400</td></tr>
<tr><td>Puducherry</td><td>₹1,11,750</td></tr>
</table>
</div>
</body>
</html>Common typography mistakes and quick fixes
| Mistake | Why it hurts | Quick fix |
|---|---|---|
| Light grey body text for a “clean” look | Fails contrast and tires the eyes | Use a darker neutral that passes 4.5:1 |
| Different heading sizes on every screen | The product feels inconsistent | Pick sizes only from the type scale |
| Long paragraphs at full desktop width | Readers lose their place between lines | Limit the text container to about 65ch |
| Placeholder text instead of labels | The hint disappears as soon as users type | Use a visible label above every field |
| Text baked into images | Cannot be resized, translated or read by screen readers | Use live text over the image |
| Fixed-height buttons and cards | Longer translations or larger text get cut off | Use padding and Auto layout instead of fixed heights |
Typography rules for UI: a quick checklist
- One or two typefaces, each with a clear role.
- A documented type scale saved as text styles.
- Body text 16px, line height about 1.5, line length about 45–75 characters.
- Two or three weights at most.
- Left-aligned paragraphs, no justified text.
- Fonts cover every language you support, with adjusted line height for Indic scripts.
- Contrast and resize requirements met.
- Checked on a real phone.
Frequently asked questions
What is the best font size for body text in UI?
16px is a sensible default for body text on web and mobile. Use 14px for secondary text and reserve 12px for short labels. In CSS, define sizes in rem so users’ browser settings are respected.
How many fonts should a website use?
Usually one or two typefaces. One family with several weights is often enough. More fonts add visual noise and extra downloads.
What line height should I use?
Around 1.4 to 1.6 for body text and about 1.1 to 1.3 for headings. Scripts with tall vowel marks, such as many Indian scripts, often need a little more.
Is it OK to use Google Fonts for Indian languages?
Yes, many families, including Noto, support Indian scripts. Load only the weights and scripts you need to keep pages fast, and test with real translated text.


