Mobile-First Design: Principles and Examples
Learn how to design for narrow screens first, then expand layouts as space allows—with responsive images, accessible reflow, and practical examples.
Mobile-first design means building the narrow-screen experience first, then adding layout and presentation as the content has room to support them. Start with the essential content and controls in a readable flow; at wider widths, introduce columns, sidebars, or expanded navigation where they help. This makes the small-screen layout the foundation of the design rather than a crowded version of a desktop page.
Mobile-first is a responsive web design approach, not a requirement to target particular phone models or to make every page a single column. The layout should change when the content needs more room. For many reading-focused pages, a single column works well at narrow widths; a genuinely two-dimensional task, such as working with a wide data table, may need a different interaction.
1. What mobile-first design means
A mobile-first workflow begins with limited horizontal space and adds complexity as the viewport grows. For an article page, that can mean showing the lead story and its key controls first, then placing related stories and secondary information beside it on a wider screen. On a narrow screen, readers should encounter the main story in a clear order, with navigation and secondary material still reachable.
The approach is useful because it makes teams decide early what matters most. It also gives a straightforward starting point for responsive layouts: enhance the base experience instead of trying to undo a dense desktop arrangement on small screens.
- Mobile-first: begin with the narrow layout and add wider-screen enhancements.
- Desktop-first: begin with a wide layout and adapt it for narrower screens.
- Responsive design: the broader approach of making a site work across available viewport sizes. It can use mobile-first CSS, desktop-first CSS, flexible layouts, or combinations of them.
MDN describes mobile-first as starting with a simple, often single-column, narrow-screen layout and adding columns at larger sizes. Breakpoints are a tool for responding to content needs, not a checklist of device models. MDN’s responsive design guide covers these layout techniques.
2. A practical mobile-first design process
- Identify the page’s primary task. Decide what people need to read, find, or do first. Keep essential content and controls available in the narrow layout.
- Set up the viewport. Tell mobile browsers to use the device width so responsive CSS can respond to the intended viewport.
- Build a readable base layout. Use a straightforward flow, comfortable text measure, and controls that remain usable without crowding.
- Add room when it helps. Introduce columns, a sidebar, or more navigation only where the content has room and the change makes relationships clearer.
- Choose breakpoints from the content. Resize the page and add a breakpoint when the layout starts to feel cramped or unnecessarily sparse. Prefer relative units for breakpoints.
- Adapt images and media. Select image sources and crops that suit the display context, and provide captions or text alternatives where needed.
- Check access at narrow widths and zoom. Confirm people can reach content and controls without clipped text or avoidable horizontal scrolling.
3. Start with the viewport and a flexible layout
Include a viewport declaration in the document head. Without it, a mobile browser may lay out the page in a wider default viewport, so narrow responsive breakpoints may not behave as intended.
<meta name="viewport" content="width=device-width" />
Here is a complete, framework-free example. Save it as index.html and open it in a browser. The base styles provide a narrow layout; the media query adds a second column when the content has room. The chosen breakpoint is an example for this content, not a universal device threshold.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>A mobile-first article</title>
<style>
* { box-sizing: border-box; }
body {
margin: 0;
color: #202124;
font: 1rem/1.6 system-ui, sans-serif;
}
.page {
width: min(100% - 2rem, 70rem);
margin-inline: auto;
}
header, main, aside, footer { padding-block: 1rem; }
nav ul {
display: flex;
flex-wrap: wrap;
gap: .5rem 1rem;
margin: 0;
padding: 0;
list-style: none;
}
.content {
display: grid;
gap: 1.5rem;
}
article, aside { min-width: 0; }
img { display: block; max-width: 100%; height: auto; }
/* Add a second column when this content can use it. */
@media (min-width: 48rem) {
.content { grid-template-columns: minmax(0, 2fr) minmax(14rem, 1fr); }
}
</style>
</head>
<body>
<div class="page">
<header>
<a href="#main">Skip to article</a>
<nav aria-label="Primary">
<ul>
<li><a href="#latest">Latest</a></li>
<li><a href="#topics">Topics</a></li>
</ul>
</nav>
</header>
<div class="content">
<main id="main">
<article>
<p>Design guide</p>
<h1>A clear reading experience at every width</h1>
<p>Put the main story first, keep its structure readable, and add supporting layout only when there is room.</p>
</article>
</main>
<aside id="topics" aria-label="Related information">
<h2>Related stories</h2>
<ul>
<li><a href="#latest">A guide to page structure</a></li>
<li><a href="#topics">Planning clear navigation</a></li>
</ul>
</aside>
</div>
<footer id="latest">End of article</footer>
</div>
</body>
</html>
The example uses CSS Grid and a media query, but neither a grid nor a media query is mandatory for every responsive page. Flexible widths and natural document flow may be enough. If you do add a breakpoint, use it because the content needs a layout change. Relative units such as rem can make breakpoint behavior more adaptable to user settings than a device-specific list of pixel widths.
4. Choose content order and navigation deliberately
A narrow layout needs a clear reading and interaction order. Put the primary content where people can reach it, and keep important navigation and actions available without letting them crowd the page. A wider layout might place a secondary rail beside an article; the narrow layout can put those links after the article or expose them through a clear navigation control.
Do not assume that hiding an item makes it unimportant. If content or a control is omitted from the mobile experience, consider whether the same task remains possible another way. Keep the source order sensible for keyboard and assistive technology users, and avoid CSS rearrangements that make the visual sequence conflict with the reading sequence.
W3C WAI’s examples show how a wide multi-column page can use a single primary column and revealed navigation when the viewport narrows. That pattern suits many reading-focused pages, but the right arrangement depends on the relationships between the content and controls. WAI’s design tips include responsive layout and media alternatives.
5. Use responsive images and provide media alternatives
Sending one large image and shrinking it with CSS can waste bandwidth; it may also use the wrong crop for a small display. HTML offers srcset and sizes for candidate images at different resolutions, and <picture> when the design needs different image sources or crops.
<img
src="story-800.jpg"
srcset="story-400.jpg 400w, story-800.jpg 800w, story-1200.jpg 1200w"
sizes="(min-width: 48rem) 60vw, 100vw"
alt="A gardener planting seedlings in a raised bed"
width="1200"
height="800"
>
In this example, the browser can choose from the supplied candidates using the viewport and the rendered image size. Replace the filenames with images that actually exist and describe the image’s purpose in the page with appropriate alternative text. When the image is decorative, use an empty alt attribute. For an art-directed crop, use <picture> with <source media="..." srcset="..."> elements and a fallback <img>.
Make room for captions, transcripts, audio-described video, and text labels alongside icons or graphical buttons where those alternatives are needed. Complex charts or tables may need a nearby text description. MDN’s image guide explains image markup; WAI’s tips discuss media alternatives.
6. Preserve accessibility when the viewport shrinks or users zoom
Responsive behavior should preserve access to information and functionality. Check the page at narrow viewport widths and with text enlarged. Avoid clipping content or forcing horizontal scrolling for ordinary reading. W3C WAI describes a single-column presentation that fits a 320 CSS pixel viewport as a common reflow pattern for article-driven content. That is useful guidance for reading pages, not a rule that every interface must use one column.
- Use semantic headings, landmarks, links, buttons, and form labels.
- Keep visible focus indicators and a logical keyboard path as navigation changes.
- Allow text to wrap; check long URLs, code, tables, and other wide content separately.
- Do not use viewport units alone to size text. MDN notes this can interfere with text zoom.
- Ensure controls remain reachable and understandable when content reflows.
For a genuinely two-dimensional presentation, such as a wide data table, explain the interaction and keep the essential task accessible. Do not treat every horizontal overflow case as a reason to shrink text until it is unreadable. WAI’s Reflow guidance explains the purpose of reflow and its limits. Its development tips cover zoom, clipping, and progressive enhancement.
The W3C’s WCAG2Mobile document is a Group Draft Note dated 6 May 2025. It offers informative guidance on applying WCAG 2.2 Level A and AA criteria to native mobile apps, mobile web apps, and hybrid apps; it says it does not set requirements. Treat it as guidance, not as a separate normative mobile standard.
7. Keep mobile content available to search engines
Google uses the mobile version of a site’s content, crawled with the smartphone agent, for indexing and ranking. For a responsive site, make sure important content and metadata remain present in that version. Avoid making primary content available only after a user interaction if it needs to be discovered by Google. Search indexing is one implementation consideration; it does not replace making the page usable for people.
Google recommends responsive design as the easiest design pattern to implement and maintain. If a site serves separate mobile and desktop versions, preserve important content and metadata on mobile. See Google Search Central’s mobile-first indexing guidance.
8. Test the responsive result with real page screenshots
Review representative pages at the narrowest layout, around each content-driven breakpoint, and at a wide viewport. Check the visual order, navigation, image crop, overflow, and whether important controls remain visible. A screenshot can reveal layout regressions quickly, but it cannot establish keyboard access, text zoom behavior, or screen-reader usability by itself; check those interactions separately.
For a repeatable visual review, capture the same page at a few viewport widths and compare the results after layout changes. Use your browser’s developer tools for manual checks, or automate captures in your own setup with a browser library. The useful test cases are the actual content and layout transitions in your site, rather than a fixed inventory of phone models.
9. Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server for developers. It can capture PNG, JPEG, WebP, or PDF from a URL. Its API accepts viewport and device options, full-page capture, element selectors, dark mode, retina scale, custom CSS and JavaScript, cookies and headers, wait conditions, and other capture settings. See the ScreenshotNeo API documentation for parameter details.
For example, capture the mobile rendering of your own page by setting the viewport dimensions in the query. Replace the placeholder with your API key and set the target URL to your page:
curl -G "https://api.screenshotneo.com/v1/shot" \
-d access_key=YOUR_API_KEY \
--data-urlencode url=https://example.com/article \
-d width=390 \
-d height=844 \
-o mobile-shot.webp
Cookie banners, newsletter popups, and chat widgets are removed before the shot; each cleanup step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and the response identifies the page verdict and billing status in headers. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots.
Sign up free for 1,000 screenshots a month, with no card.
10. Troubleshooting mobile-first layouts
| Symptom | Likely cause | Fix |
|---|---|---|
| The mobile layout looks like a scaled-down desktop page. | The page starts with fixed widths or multiple columns. | Remove unnecessary fixed widths, start with the essential content flow, and add columns only when they fit. |
| Responsive breakpoints do not activate as expected on a phone. | The document is missing the viewport declaration or has an unsuitable width setting. | Add <meta name="viewport" content="width=device-width"> and inspect the effective viewport. |
| Text or controls are clipped at narrow widths. | Fixed dimensions, non-wrapping content, or an inflexible grid track are forcing overflow. | Allow text to wrap, use flexible tracks such as minmax(0, 1fr), and review long content and controls individually. |
| The page breaks when text is enlarged. | Text sizing or containers depend on viewport-only sizes, or overflow is hidden. | Use text sizing that can grow, remove unnecessary clipping, and verify reflow with enlarged text. |
| An image downloads at a large size or has a poor small-screen crop. | A single oversized source is used for every display context. | Provide responsive candidates with srcset and sizes, or art-direct a crop with <picture>. |
| Mobile users cannot find a secondary action. | The action was hidden as part of a layout simplification. | Keep the task reachable, using a clear navigation or disclosure pattern when appropriate. |
| A visual screenshot looks correct but the experience is still difficult to use. | A static image cannot show keyboard, zoom, or assistive technology behavior. | Test keyboard access, enlarged text, and the semantic reading order in addition to visual captures. |
11. Performance, reliability, and maintenance
Mobile-first CSS does not guarantee a faster page by itself. Performance depends on what the page downloads and does. Responsive image sources can avoid sending one unnecessarily large image to every display context; measure the result with your own assets and users rather than assuming a fixed speed gain.
Keep the base layout simple and make responsive enhancements easy to understand. Use a small set of content-driven layout changes where that keeps the design maintainable, and review shared templates when navigation or content structure changes. Check representative pages at narrow and wide widths after those changes. Automated screenshots help catch visual differences, while browser and assistive technology checks cover behavior that images cannot.
When capturing pages through an API, render completion may depend on network activity, client-side rendering, and page-specific delays. Choose a wait condition that matches how the page loads, and avoid treating one screenshot as proof that every interactive state works. ScreenshotNeo’s free plan is 1,000 shots monthly; paid plans are $5 for 3,000, $15 for 15,000, $39 for 60,000, $99 for 250,000, and $249 for 1,000,000. Yearly billing gives two months free, and every feature is on every plan. Cache hits are not billed.
12. Frequently asked questions
Is mobile-first the same as responsive design?
No. Responsive design is the broader approach; mobile-first is one way to structure the design and implementation process.
Does mobile-first mean designing only for phones?
No. It starts with the narrow constraint, then considers how the experience should grow across wider viewports too.
Does every mobile page need one column?
No. A single column is common for reading-focused content, but the layout should preserve important content relationships and support the task.
Should I use a fixed list of breakpoints?
Use breakpoints where the content needs a change. A breakpoint set is a project choice, not a universal device map.
Can screenshots replace responsive accessibility checks?
No. Screenshots show visual output at a point in time; they do not test keyboard use, text zoom, or assistive technology behavior.


