---
title: "Modern Web Design: Best Practices and Key Examples"
description: "Discover best practices in modern web design with examples, ratios for containers, margins, text sizes, and tips to create visually stunning, functional websites."
url: https://www.ultraperfekt.ch/en/insights/modern-web-design-best-practices
language: en
---

![Modern Web Design: Best Practices and Examples for Stunning Websites](https://cdn.sanity.io/images/29k8lc52/production/737c14612c8951b64bc4f2ed9b9f63a317b45419-2912x1632.avif?w=1920&fit=max&auto=format)

[Design & Branding](https://www.ultraperfekt.ch/en/insights/category/design-branding)

# Modern Web Design: Best Practices and Examples for Stunning Websites

19112024

1. [Home](https://www.ultraperfekt.ch/en)
2. [Insights](https://www.ultraperfekt.ch/en/insights)
3. Modern Web Design: Best Practices and Examples for Stunning Websites

Contents

1. Container Ratios and Layouts
2. Auto Layout: Simplifying Responsive Design
3. Padding and Margins
4. Typography and Text Sizes
5. Colors and Contrast
6. Buttons and CTAs (Call-to-Actions)
7. Images and Media
8. Accessibility Standards
9. Conclusion: Combining Design and Functionality

## In brief

- Layout: a maximum width of 1200px on desktop, fluid grids (12 columns) and responsive units (%, vw/vh).
- Auto layout (flexbox or grid in CSS) adjusts positioning and spacing automatically and keeps the design consistent across devices.
- Body text at 16px with a line height of 1.5, and spacing in multiples of 4px.
- Images compressed, served as WebP or AVIF, and lazy-loaded.
- Accessibility: text-to-background contrast of at least 4.5:1, buttons of at least 44 × 44px, keyboard navigation, ARIA labels and alt text.

Creating a visually appealing and functional website requires understanding the principles of **modern web design**. From layout ratios to typography and spacing, every detail plays a crucial role in crafting a site that not only looks great but also provides an exceptional user experience. This guide explores the best practices, examples, and standards for modern web design and its seamless implementation.

## Container Ratios and Layouts

A well-structured layout is the foundation of modern web design. Containers organize content into sections, ensuring it remains visually balanced and easy to navigate.

**Best Ratios**:

- Use a **max-width of 1200px** for desktop layouts to maintain readability and avoid overwhelming users with overly wide content.
- Opt for **16:9 or 4:3 ratios** for image containers to achieve a harmonious visual balance.
- Keep **fluid grids** (e.g., 12-column systems) to ensure flexibility across devices.

**Implementation Tips**:

- Center the container horizontally with margin: 0 auto.
- Use responsive units like percentages (%) or vw/vh to ensure the design adjusts seamlessly to screen sizes.

## Auto Layout: Simplifying Responsive Design

Auto layout is a modern technique that streamlines the process of creating responsive designs by automatically adjusting the positioning and spacing of elements based on container rules.

**How It Works**:

- In tools like Figma, Webflow, or CSS frameworks, auto layout dynamically aligns and spaces elements within a container.
- When elements are added, resized, or reordered, the layout automatically adjusts without manual repositioning.

**Best Practices**:

Use **flexbox or grid systems** in CSS for auto layout implementation:

**Why It’s Important**:

- Reduces design time by automating element adjustments.
- Ensures responsiveness across screen sizes without additional effort.
- Maintains design consistency, especially for complex layouts with multiple elements.

## Padding and Margins

Spacing defines the rhythm of your design and contributes to a clean, organized look.

**Best Practices**:

- Use **padding of 20–40px** inside containers for sufficient breathing room around content.
- Maintain a **margin of 16–24px** between sections to avoid a cluttered appearance.
- Follow a consistent spacing system, such as **multiples of 4px** (e.g., 4px, 8px, 16px, 32px), for uniformity.

**Example**

For a hero section:

## Typography and Text Sizes

Typography greatly influences readability and aesthetics.

**Font Ratios**:

- Use a **base font size of 16px** for body text.
- Headings should follow a **modular scale**:
    - H1: 36–48px
    - H2: 28–32px
    - H3: 22–24px
    - Paragraphs: 16–18px
- Line height: **1.5x the font size** for paragraphs and headings.

**Font Pairing**:

- Pair a **serif font** for headings with a **sans-serif font** for body text for contrast.
- Examples: Playfair Display (Headings) + Roboto (Body).

## Colors and Contrast

Modern web design relies on effective use of colors to guide users’ attention and evoke emotions.

**Color Palette**:

- Primary colors: Define your brand identity.
- Secondary colors: Complement the primary palette.
- Neutral tones: Backgrounds and secondary content (e.g., white, gray).

**Contrast Ratios**:

- Text-to-background contrast should meet a **minimum of 4.5:1** for accessibility.
- Use tools like **WebAIM Contrast Checker** to verify.

## Buttons and CTAs (Call-to-Actions)

Buttons are critical for user engagement and navigation.

**Size**

Ensure buttons are **large enough to be tapped easily**: minimum size of 44px x 44px.

**Spacing**

Use at least **12–16px of padding** inside buttons.

**Styling**

Add hover effects for interactivity:

## Images and Media

High-quality visuals enhance your site’s appeal.

**Optimization**

- Compress images using tools like **TinyPNG** or **ImageOptim**.
- Serve **WebP** or **AVIF** formats for faster loading.

**Ratios**

Use consistent ratios (e.g., **16:9** for banners, **1:1** for profile images).

**Lazy Loading**:

Enable lazy loading to improve performance:

## Accessibility Standards

Modern web design must prioritize inclusivity.

**Keyboard Navigation**:

Ensure all interactive elements (e.g., buttons, links) are keyboard-accessible.

**ARIA Labels**:

Use ARIA attributes to describe elements to screen readers:

**Text Alternatives**:

Add descriptive alt text to all images.

## Conclusion: Combining Design and Functionality

Modern web design is a balance between aesthetics and functionality. By implementing best practices for container ratios, typography, spacing, auto layout, and accessibility, you can create visually stunning websites that provide exceptional user experiences. With inspiration from industry-leading examples, your design can stand out and ensure seamless development for a successful web project.

## Related projects

- [Startups.ch](https://www.ultraperfekt.ch/en/projects/startups-ch)
- [Procivis AG - An Orell Füssli Company](https://www.ultraperfekt.ch/en/projects/procivis)
- [Billups](https://www.ultraperfekt.ch/en/projects/billups)

## Insights: Articles on Web, Design and AI

[Show all articles](https://www.ultraperfekt.ch/en/insights)

- ![Visual Branding turned upside down: Why starting with the web (design) is more important than you think.](https://cdn.sanity.io/images/29k8lc52/production/2654b5b649818424a522ec7065163706d4bd6b58-2912x1632.webp?w=720&fit=max&auto=format)

    [Design & Branding](https://www.ultraperfekt.ch/en/insights/category/design-branding) 05112024

    ### Visual Branding turned upside down: Why starting with the web (design) is more important than you think.

- ![Why Great Web Design Doesn’t Start with Design](https://cdn.sanity.io/images/29k8lc52/production/d2ce064f924bcbb1b8169c7b90298b2782029a2f-2944x1648.avif?w=720&fit=max&auto=format)

    [Design & Branding](https://www.ultraperfekt.ch/en/insights/category/design-branding) 06072026

    ### Why Great Web Design Doesn’t Start with Design

- ![Web Design Trends 2026: Towards Intelligent and Adaptive Experiences](https://cdn.sanity.io/images/29k8lc52/production/56d7016844308b05ed26ed28676de58605f99776-2912x1632.avif?w=720&fit=max&auto=format)

    [Design & Branding](https://www.ultraperfekt.ch/en/insights/category/design-branding) 17022026

    ### Web Design Trends 2026: Towards Intelligent and Adaptive Experiences

- ![Animation, performance and UX as a functional system](https://cdn.sanity.io/images/29k8lc52/production/b2f1d207c884ba7e85e61f4c2e5410241f371563-2912x1632.avif?w=720&fit=max&auto=format)

    [Design & Branding](https://www.ultraperfekt.ch/en/insights/category/design-branding) 09022026

    ### Animation, performance and UX as a functional system

## Contact us

To guarantee a perfectly tailored response to your specific web design requirements, we invite you to contact us for a personalized proposal.

[I'm interested](https://www.ultraperfekt.ch/en/contact)
