Lesson 5 of 9
Typographic Hierarchy - Heading Levels, Body, Caption & Label Styles
Typographic hierarchy is the systematic use of font size, weight, spacing, and color to communicate the relative importance of text elements on a screen. A strong typographic hierarchy allows users to scan content and understand its structure in milliseconds - without reading a single word. Weak typographic hierarchy forces users to read everything to understand what's important, which is both exhausting and inefficient. This topic covers how to build and apply a complete typographic hierarchy system for UI design.
The Full Typography Hierarchy for UI
- Display: 40-96px, Bold/Black weight. Used for major hero sections, landing page headlines, and splashscreen text. Typically only 1-2 display-size elements per screen - more creates visual chaos. Letter spacing should be tight (-1 to -3px). Used sparingly for maximum impact
- Heading 1 (H1): 32-48px, Bold. The primary title of a page or screen. There should be exactly one H1 per screen for accessibility and semantic clarity. Users who scan using AT (assistive technology) use headings as landmarks - multiple H1s destroy navigability
- Heading 2 (H2): 24-32px, SemiBold/Bold. Section headings within a screen. Multiple H2s per screen is appropriate when the screen has distinct sections (e.g., a settings page with 'Account', 'Privacy', 'Notifications' sections)
- Heading 3 (H3): 20-24px, SemiBold. Subsection headings within H2 sections. Used more in document/article contexts than in app interfaces
- Body Default: 16px, Regular. The default reading size for paragraphs, descriptions, and general content. This is the baseline - everything smaller is supplementary, everything larger is structural
- Body Small: 14px, Regular. Supplementary information, secondary descriptions that support the primary content without competing for attention
- Label: 12-14px, Medium/SemiBold. UI labels - form field labels, table column headers, data attribute labels. Labels often use slightly increased letter spacing for readability at small sizes. All-caps labels should use 10-11px
- Caption/Helper: 11-12px, Regular. Microcopy - character counts, helper text below form fields, timestamps, fine print. Must have sufficient contrast (WCAG AA: 4.5:1 ratio)
Typography in Dark Mode
Dark mode typography requires adjustments beyond simply inverting colors. When background darkens, perceived font weight lightens - the same Regular weight font looks thinner on a dark background than on white. Compensation: use slightly heavier weights on dark backgrounds (Regular becomes Medium, SemiBold becomes Bold). Text color in dark mode should NOT be pure white (#FFFFFF) - it creates excessive contrast that causes eye strain during extended reading. Professional dark mode text color is 90-95% opacity white: rgba(255,255,255,0.9) or #F0F0F0. Secondary text in dark mode should use 60-70% opacity white: rgba(255,255,255,0.6). Disabled text: 38% opacity white. These values come directly from Material Design's dark theme specification - they're informed by extensive readability testing. Additionally, line height should increase slightly in dark mode - the expanded spacing reduces visual fatigue during extended use on dark surfaces.
Typographic Hierarchy - Heading Levels, Body, Caption & Label Styles: Visual guide and core principles.
Common Typography Mistakes in UI
- More than 4 font sizes on one screen: Every additional size past 4 adds visual noise. If you find yourself needing 7 sizes on one screen, you have a hierarchy problem - simplify the content structure, don't add more type sizes to compensate
- Center-aligning body text: Center alignment is appropriate for 1-3 line headings and call-to-action text. Paragraphs of body text should never be center-aligned - the ragged left edge forces the eye to re-anchor at a different position for each line, dramatically reducing reading speed
- Insufficient line height on body text: Setting line-height to 1.0 or 1.2 for paragraph text is one of the most common readability mistakes. The text feels claustrophobic and users give up reading. Always use 1.4-1.6 for text blocks over 2 lines
- Small text with low contrast: Designers often use light gray on white for secondary text ('#AAAAAA on #FFFFFF'). This fails WCAG AA contrast requirements and becomes unreadable on low-quality screens or in bright outdoor lighting
- Using too many font families: A maximum of 2 font families per product (1 for display/headers, 1 for body text) is the industry standard. Three or more fonts creates visual cacophony
Tip
Tip
Practice Typographic Hierarchy Heading Levels Body Caption Label Styles in small, isolated examples before integrating into larger projects. Breaking concepts into small experiments builds genuine understanding faster than reading alone.
Practice Task
Note
Practice Task - (1) Write a working example of Typographic Hierarchy Heading Levels Body Caption Label Styles from scratch without looking at notes. (2) Modify it to handle an edge case (empty input, null value, or error state). (3) Share your solution in the Priygop community for feedback.
Quick Quiz
Common Mistake
Warning
A common mistake with Typographic Hierarchy Heading Levels Body Caption Label Styles is skipping edge case testing - empty inputs, null values, and unexpected data types. Always validate boundary conditions to write robust, production-ready ui ux code.
Key Takeaways
- Typographic hierarchy is the systematic use of font size, weight, spacing, and color to communicate the relative importance of text elements on a screen.
- Display: 40-96px, Bold/Black weight. Used for major hero sections, landing page headlines, and splashscreen text. Typically only 1-2 display-size elements per screen - more creates visual chaos. Letter spacing should be tight (-1 to -3px). Used sparingly for maximum impact
- Heading 1 (H1): 32-48px, Bold. The primary title of a page or screen. There should be exactly one H1 per screen for accessibility and semantic clarity. Users who scan using AT (assistive technology) use headings as landmarks - multiple H1s destroy navigability
- Heading 2 (H2): 24-32px, SemiBold/Bold. Section headings within a screen. Multiple H2s per screen is appropriate when the screen has distinct sections (e.g., a settings page with 'Account', 'Privacy', 'Notifications' sections)
Finished this lesson?