Frontend Development 8 min read

Visual Hierarchy in UI Design: Using Font Weight, Color, and Layout to Emphasize Elements

This article explains how visual hierarchy in UI design can be achieved by strategically using font weight, color, and contrast instead of size, offering practical examples of emphasizing primary elements, weakening secondary ones, handling label-value patterns, and applying semantic HTML for clearer, more effective interfaces.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Visual Hierarchy in UI Design: Using Font Weight, Color, and Layout to Emphasize Elements

Visual design’s core is making things look good, but effective hierarchy provides a logical basis for improving aesthetics by controlling the perceived importance of interface elements.

Do Not Use Size to Highlight Elements

Relying on font size to convey importance often leads to overly large primary content and tiny secondary content. Using font-weight instead yields a more balanced hierarchy.

Combining font weight with a secondary color further distinguishes levels without excessive size differences.

Avoid Gray Text on Colored Backgrounds

Gray text works on white backgrounds but loses contrast on colored backgrounds; matching text color to background tone and adjusting opacity creates better hierarchy.

Weaken or Emphasize?

Sometimes it is better to weaken surrounding elements rather than overly emphasize the target, as shown in navigation examples.

The Annoying Label‑Value Pattern

Label‑value pairs give equal visual weight to all data, making it hard to convey hierarchy. Merging label and value (e.g., "12 in stock" instead of "Stock: 12") improves clarity.

Alternative Label Expressions

When labels are necessary, reduce their size, contrast, or weight to make them less dominant.

Emphasizing Labels When Needed

In dense, data‑heavy pages (e.g., B‑side or mobile specs), emphasize important labels carefully without overwhelming the layout.

Semantic HTML Tags

Using proper semantic tags like section , article , and appropriate heading levels (h1‑h6) helps maintain hierarchy and accessibility.

Emphasis Through Coverage Area

Bold text feels more prominent because it occupies more pixel area; the same principle applies to icons, which can be de‑emphasized by using softer colors.

Using Contrast to Adjust Weight

Adjusting an icon’s color contrast is an effective way to change its visual weight without altering its size.

Semantic Considerations

When multiple actions exist on a page, only one should be the primary action, with secondary and tertiary actions placed according to a visual hierarchy using color, outline, or no‑style techniques.

Understanding and applying these principles leads to clearer, more usable interfaces.

Frontend DevelopmentUI designtypographysemantic HTMLfont weightvisual hierarchycolor contrast
Rare Earth Juejin Tech Community
Written by

Rare Earth Juejin Tech Community

Juejin, a tech community that helps developers grow.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.