Websites & Hosting

Mobile-First Design in Practice

A working method for designing the small screen first: priorities, layout, touch, forms, performance and testing.

Key takeaways

  • Rank the tasks and content for each page before drawing any layout.
  • Write base styles for narrow screens and layer larger layouts on with minimum-width media queries.
  • Give touch targets enough size and spacing, and never depend on hover.
  • Treat performance as part of the design, since many phones and networks are modest.
  • Mobile-first is a starting order, and large screens still deserve a layout of their own.

Mobile-first design means you decide what a page must do on a small, touch-operated screen on an uncertain connection, build that, and then add to it as more space and capability become available. The payoff is focus: when only a few things fit, you're forced to rank them, and the ranking usually improves the desktop version too.

Here is a practical sequence you can apply to a new page or a redesign, with the CSS patterns, touch and form details and checks that go with it.

Why start small

Retrofitting a dense desktop design onto a phone tends to produce long stacks of leftovers: every sidebar and promotion, squeezed into one column. Starting small reverses the question from "what can we cut?" to "what earns a place?"

It also matters for search. Google has said it primarily uses the mobile version of pages for indexing, so content you remove from the phone view may be content search can't use. Keep the substance the same across sizes. Change arrangement and emphasis, not what is true or available.

Rank before you sketch

For each page type, write one sentence: "A visitor here mainly wants to ___." Then list content and actions in priority order.

A mobile-first working sequence
1 Name the task What is this page for on a small screen? 2 Rank content Order it by what the visitor needs first. 3 One column Lay it out in that order in plain HTML. 4 Make it usable Size controls, simplify forms, trim weight. 5 Enhance Add columns and extras as room appears. 6 Test on devices Real phones, real networks, real hands. Name the task What is this page for on a small screen? 1 Rank content Order it by what the visitor needs first. 2 One column Lay it out in that order in plain HTML. 3 Make it usable Size controls, simplify forms, trim weight. 4 Enhance Add columns and extras as room appears. 5 Test on devices Real phones, real networks, real hands. 6

Real data helps with ranking: site search terms, common support questions and which pages phone visitors use. Planning a website structure covers the wider map. Be suspicious of any item whose only argument is that someone internally wants it near the top.

Write CSS from small to large

Base rules apply everywhere. Media queries with min-width add complexity upward:

.grid { display: grid; gap: 1rem; }

@media (min-width: 40rem) {
  .grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 64rem) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

This tends to produce less overriding than starting wide and undoing things with max-width queries. The viewport tag and flexible techniques in responsive web design explained are the foundation.

Design for fingers

A fingertip covers far more area than a mouse pointer, and people often tap while walking or holding something.

WCAG 2.2 sets a level AA minimum for pointer targets of 24 by 24 CSS pixels, with exceptions such as inline links and targets that have enough spacing. Its stricter AAA criterion is 44 by 44. Platform design guides recommend similarly generous sizes. For primary actions, aim for the larger figure.

Other touch habits:

  • Leave space between destructive and common actions.
  • Provide a visible button for anything done by swiping or dragging.
  • Don't hide information behind hover.
  • Show an immediate pressed or loading state.
  • Place frequent actions where they're comfortable to reach, without covering content.

Simplify navigation

You have little horizontal room, so choose a pattern that fits the number of destinations.

Pattern Works when Cost
A few visible links Three to five key destinations Limited space
Menu button Many sections Items are out of sight
Priority links plus "More" A clear top few Needs good ranking
Search first Large catalogs or help centers Search has to work well

Label menu buttons with a word where you can, since not everyone reads an icon the same way. Keep nesting shallow and make the current location obvious.

Make forms painless

Typing is the hardest thing to do on a phone.

  1. Ask only for what you need.
  2. Use one column.
  3. Set the right type, such as email, tel or url, and use inputmode for numeric codes.
  4. Add autocomplete tokens so the phone can fill details. For a texted verification code, one-time-code helps supported devices offer it.
  5. Keep labels above fields, not only as placeholders.
  6. Use input text of at least 16 pixels, which avoids automatic zoom on some mobile browsers.
  7. Put errors next to fields and keep what was typed.

Passwords are painful on small keyboards. Offering passkeys or sign-in links, and allowing password managers to fill and paste, removes much of the pain.

Treat speed as a design decision

Many visitors use mid-range phones with limited processing power, and connections vary from excellent to barely usable. Decisions made in design determine most of the weight.

Where mobile page weight comes from
Phone page Everything competes for time and battery. Video Load on demand Third parties Tags, chat, ads Images Resize and compress Scripts Cut and defer Fonts Few files, subsets Phone page Everything competes for time and battery. Images Resize and compress Scripts Cut and defer Fonts Few files, subsets Third parties Tags, chat, ads Video Load on demand

Set a budget, such as a maximum for script and total transfer on key pages, and check changes against it, as described in performance budgets. Lazy-load images below the first screen but not the main one at the top. Keep layout stable by reserving space for images, ads and banners so buttons don't move under a thumb.

Handle interruptions and bad networks

Phone use is broken into pieces. People switch apps, lose signal in a lift or lock the screen mid-form. Save progress in multi-step flows. Make submissions safe to retry. Say clearly when something failed because of the connection, and offer to try again. For some sites, service workers can keep key pages available offline, though they add maintenance and need care with updates.

Then design the big screen properly

Mobile-first shouldn't yield a phone layout stretched across a monitor. As width grows, use it: show a persistent sidebar, place comparison items side by side, widen margins and keep line length readable. Add keyboard shortcuts or hover previews as enhancements, never as the only route.

A worked example: a local service page

Say you run a bicycle repair shop and are redoing the service page. The desktop draft opens with a large photo carousel, a welcome paragraph, a company history, a price table, a booking form and, at the very bottom, the address and hours.

Ask what a phone visitor wants. Probably: are you open, where are you, what does a repair cost and can I book. Ranked for a small screen, the page becomes:

  1. Service name and one sentence on what you fix.
  2. Today's hours, with call and directions links.
  3. A short price list, with the most common jobs first.
  4. A booking button leading to a brief form.
  5. One real photo of the workshop.
  6. History and extra detail further down.

Make the phone number a tel: link and the address a link that opens a map. Show prices as a simple list rather than a five-column table. The carousel goes, since most of its slides would rarely be seen.

On a wide screen, the same content can place hours and booking in a side column that stays in view, with the price list beside the photo. The order in the HTML stays the same, so reading and keyboard order still make sense.

Content habits that suit small screens

Writing changes too. Put the answer in the first sentence under each heading. Keep paragraphs short, since four lines on a monitor can be ten on a phone. Use headings that say something, so a thumb-scroller can find the part they need.

Front-load link and button text: "Book a repair" beats "Click here to find out about booking." Check that headlines don't wrap into five lines at large text settings.

Be careful with anything wide: comparison tables, diagrams with tiny labels and screenshots of whole desktop windows. Crop screenshots to the relevant part, and redraw dense diagrams as steps in text. Offer downloads sparingly, because documents designed for paper are awkward on a phone. How to write web content people will read goes further.

Finally, make sure content people may need later is easy to return to: stable addresses, a visible share option where it helps and confirmation pages that can be saved or emailed. Phone visitors often start a task on the move and finish it somewhere else.

Common pitfalls

  • Full-screen pop-ups that arrive before content.
  • Sticky headers plus sticky footers that leave a slit to read through.
  • Carousels that hide most of what they hold.
  • Tables shrunk until unreadable.
  • Blocking zoom.
  • Testing only in a desktop browser's device simulator.

Measure whether it worked

Compare phone behavior before and after a redesign, using the same period lengths where you can. Useful signals include how many visitors complete the main task, where forms are abandoned, which menu items get used, how often people search because they couldn't find something and what support messages mention. Look at loading and responsiveness measurements from real visitors if your tools collect them, since laboratory tests on a fast computer can flatter a page.

Watch for losses too. If a task that used to be common drops after you moved it into a menu, bring it back into view. Treat the first release as a hypothesis, keep a short list of what you expected to improve and check each item a few weeks later. Small, frequent corrections beat another large redesign a year on.

Test the way people use it

Use at least one older, modest phone. Try it one-handed, outdoors, with large text turned on and on a throttled or weak connection. Ask someone to complete the main task without guidance and watch where they pause or mis-tap. Check portrait and landscape, and try opening a link to your page from a messaging or social app, since in-app browsers behave differently, as mobile browsers explains.

Afterward, revisit your ranked list. If testers keep scrolling past the top item to find something lower down, your priorities need to change before your CSS does.

Written for 4Internet with AI writing tools and not reviewed line by line by a person. Check anything you rely on with the maker, provider or standard concerned. Report an error.

Keep reading

All 45 articles in Websites & Hosting →

Latest news on this topic