lesson
30 min

Build a Clear Page

Write a mobile-first web page with HTML and CSS, with the message and main action first.

What you will learn

By the end of this lesson, you can build a simple mobile-first page with HTML and CSS that puts the message and main action first.

Two languages make a page

  • HTML is the structure. It says "this is a heading," "this is a paragraph," "this is a link."
  • CSS is the style. It controls color, size, and spacing.

Write the words first. Then add the structure. Style comes last.

Mobile-first

Mobile-first means you design for a small phone screen first, then make it work on bigger screens. For many community organizations, most visitors arrive on phones. Some have older phones and limited data. A page that works on a small, slow phone works for almost everyone.

Mobile-first habits:

  • One column. No side-by-side boxes on a phone.
  • Big tap targets. Buttons at least the size of a fingertip.
  • Readable text. Body text around 16 pixels or larger.
  • Phone numbers as links, so one tap starts a call.

Message first

Your first screen should answer three questions: What is this? Is it for me? What do I do next? Here is a common, clear order:

  1. A heading that says what you offer, in plain words.
  2. One sentence on who it is for.
  3. The main action button.
  4. The key facts: hours, place, what to bring.

Try it

Edit the page below. The editor runs in your browser. If you use a keyboard, press Esc, then Tab, to leave the editor.

A clear, mobile-first page

1) Change the heading to a real kind of free program (use a made-up name). 2) Change the button text to the one main action. 3) Add one more fact to the list. 4) Change the button color in the CSS and check that the text is still easy to read.

Loading the code editor...

Press Esc, then Tab, to move focus out of the editor.

The phone link uses a made-up 555 number. Never put a real person's phone number in practice code.

First-screen check

0 of 5 done

Go deeper: Web Design That Works: A Practical Guide to Building Faster, Clearer, Higher-Converting Sites

Ask. Answer. Build together.