IONASCU®
Back

6 min read

Web typography: what sizes and line-height should you use?

Complete FAQ guide on web font sizes, line-height calculations, contrast, performance, and readability across all screen sizes.

Web typography: what sizes and line-height should you use?

Web typography goes beyond selecting an attractive font; it forms the foundation of readability and performance for any online project. Poorly configured font sizes or line spacing will drive visitors away before they finish reading the first paragraph. In this practical guide, I address the most frequent questions regarding typography, font sizes, line-height, and screen legibility.

What is the minimum font size for body text on a website?

The minimum recommended font size for body copy on screen is 16px, though modern standards for comfortable reading sit at 18px. Using sizes below 16px makes reading difficult on mobile devices and forces users to zoom in, ruining the user experience. For headings and subheadings, the typographic scale should be proportioned directly against this baseline. When I build a site de prezentare, I set 18px as the starting base for body paragraphs, scaling headings from 32px to 48px based on visual hierarchy. Secondary text, such as captions or labels, should not drop below 14px. Correct sizing keeps visitors engaged and reduces bounce rates.

How do I calculate the correct line-height ratio?

Line-height for body copy should be set between 1.4 and 1.6 times the font size, whereas headings require a tighter ratio between 1.1 and 1.3. For instance, using an 18px font with a 1.5 line-height results in a 27px total line height. Insufficient spacing causes character overlaps and eye strain, while excessive line-height breaks the natural reading flow of sentences.

The relationship between font size and line-height applies differently based on text type:

  • Body copy: line-height between 1.5 and 1.6 (150%-160%) for long blocks of text.
  • Large Headings (H1, H2): smaller line-height between 1.1 and 1.25, as larger letters require a tighter structure.
  • Short text boxes or UI buttons: line-height set to 1 or 1.2 for precise vertical alignment.

These principles are consistently integrated into professional design grafic to ensure layouts remain well-proportioned across all screen sizes.

Why does line length (measure) matter and how many characters should a line contain?

The optimal line length for readable web text ranges between 45 and 75 characters per line, with the ideal sweet spot being 60 to 65 characters including spaces. If a text line is too long, the reader's eyes tire easily, making it difficult to find the start of the next line. Conversely, if lines are too short (under 35-40 characters), the reading rhythm is disrupted by constant line jumps. In CSS, you can control measure using the ch unit (e.g., max-width: 65ch). This simple technique dramatically improves legibility on blog posts and service pages, whether viewed on a 27-inch monitor or a mobile phone.

Should I use pixels (px) or rem/em for setting typographic sizes?

You should use relative units like rem and em for font sizes, reserving px strictly for borders or fixed micro-layout elements. Using rem (root em) allows the entire site text to scale automatically based on the user's browser preferences. If a user with visual impairments increases their default browser font size from 16px to 24px, a site built with rem will adapt instantly while maintaining design proportions. Hardcoding font sizes in px ignores user accessibility settings. Implementing a rem-based architecture is essential for any modern identitate vizuală project to guarantee inclusive, WCAG-compliant design.

How do custom web fonts affect page load speed and how can they be optimized?

Downloading multiple external font files can significantly slow down page load times, increasing visual latency and causing unwanted phenomena like FOUT (Flash of Unstyled Text). Every font weight or style (Regular, Bold, Italic) represents a separate file that the browser must download, adding dozens or hundreds of kilobytes to page weight.

To maintain fast loading speeds, apply the following technical best practices:

  • Limit font selection to a maximum of 2 font families and no more than 3-4 weights in total.
  • Serve modern compressed formats such as WOFF2 instead of legacy TTF or OTF files.
  • Apply the CSS property font-display: swap to immediately display a system fallback font until the custom font loads.
  • Consider using Variable Fonts, which pack all weights into a single small file.

Optimizing font assets is crucial for overall performance, supporting modern optimizare GEO / AEO / AIO strategies where site speed influences how AI search engines process and index your content.

What is color contrast in typography and what are the minimum required ratios?

Color contrast measures the brightness difference between the text color and its background color, with the minimum acceptable ratio under WCAG 2.1 AA being 4.5:1 for standard body text. For large text (above 24px regular or 18px bold), the minimum ratio drops to 3:1. Light gray text on a white background might look sleek in early design drafts, but it becomes unreadable under bright sunlight. Ensuring adequate contrast is not merely an aesthetic choice, but a functional necessity. During design projects, color palettes are rigorously tested to ensure full compliance with AA or AAA accessibility standards.

How do I select the right font combination for headings and body copy?

An effective font pairing relies on clear visual contrast, typically combining a serif font for headings with a sans-serif font for body copy, or vice versa. Avoid pairing two fonts that look overly similar from the same font category, as this creates visual confusion without establishing a clear hierarchy. For example, an elegant serif heading brings character and authority to a brand, while a geometric sans-serif guarantees effortless reading across long paragraphs. Before starting a creare logo or web design project, selecting a cohesive typography pair ensures brand consistency across all digital touchpoints.

What is fluid typography and how does it replace complex media queries?

Fluid typography is a modern CSS technique that allows font sizes to scale smoothly and continuously between a minimum and maximum threshold based on the user's viewport width. Instead of triggering abrupt font size changes at specific breakpoints using traditional media queries, fluid typography uses the CSS clamp() function. For instance, font-size: clamp(1rem, 2.5vw, 2rem) ensures font sizes never drop below 1rem (16px) or exceed 2rem (32px), scaling proportionally at 2.5% of the viewport width. This approach eliminates awkward visual jumps across tablets and wide monitors, producing perfectly balanced typography on any screen.

What's next?

Well-executed typography elevates a basic website into a clear, accessible, and high-performing communication tool. If you want to optimize your digital presence or need comprehensive web design, branding, and typography services, you can explore my past work to see concrete examples. Feel free to browse through my portofoliu or reach out via the contact page to discuss your project's specific requirements.

Start a project