Sub topic 2
Deciding what matters most: ranking your content
This chapter assumes you can write semantic HTML, use CSS selectors and the box model, and open your browser's developer tools. It covers the step that comes before any layout work: deciding what goes first on a small screen.
Why ranking comes before layout
A phone screen shows far less than a desktop monitor. If you build the desktop page first, you have to cut or hide content later, and those cuts tend to be arbitrary. Mobile-first reverses the order. You rank the content while the constraint is tightest, and that ranking becomes the order of your HTML.
Ranking is a decision about users, not about design. The question is: what did the visitor come here to do?
A simple ranking method
Use this process for any page.
- List the user tasks. Write the two to five things visitors most often want. For a cafe website these might be: find opening hours, see the menu, find the address, book a table.
- Sort them by frequency and urgency. A visitor standing outside the door needs opening hours now. A visitor reading the "our story" section is browsing.
- Sort the content into tiers. Each piece of content goes into one of three groups.
- Write the HTML in tier order. Tier 1 comes first in the source.
| Tier | Meaning | Cafe example |
|---|---|---|
| Core | Needed by most visitors to finish their main task | Opening hours, address, menu link |
| Supporting | Helps some visitors decide or act | Photos, reviews, booking form |
| Optional | Interesting but not needed to complete a task | History, press mentions, team bios |
If you cannot decide which tier something belongs in, ask whether a visitor would complain if it were missing. If not, it is probably Optional.
From ranking to source order
On a single-column layout, elements appear in the order they sit in the HTML. That makes your ranking visible directly in the markup.
<main>
<section id="visit">
<h1>Maple Street Cafe</h1>
<p>Open today until 6 pm</p>
<p>14 Maple Street</p>
<a href="/menu">See the menu</a>
</section>
<section id="book">
<h2>Book a table</h2>
<a href="/book">Reserve online</a>
</section>
<section id="story">
<h2>Our story</h2>
<p>The cafe opened in 2009 in a former bakery.</p>
</section>
</main>The core tier (#visit) comes first, the supporting tier next, and the optional tier last. A screen reader user and a visitor with CSS disabled get the same sensible order.
Common mistakes
- Ranking by what the organisation cares about. A company may want its mission statement at the top. Visitors usually want something else. Base the ranking on user tasks, not internal opinion.
- Calling everything core. If five items are all "most important," none is. Limit the core tier to what fits comfortably in the first screen or two.
- Reordering with CSS only. Properties such as
orderin flexbox or grid change what you see, not what keyboard and screen reader users move through. Fix the order in the HTML first and use CSS reordering sparingly. - Deleting content on mobile. Ranking decides order and emphasis. Lower-tier content should still be reachable. A later chapter on progressive disclosure shows how to keep it available without crowding the screen.
- Guessing. If you have analytics, check which pages and links visitors use most. If you do not, ask a few real users what they came to do.
What this gives you next
The tier list and the source order are the inputs for the next steps. Once the viewport is configured and the single-column layout is built, larger screens can rearrange or expand the content without changing what you decided matters most.
Exercise
You are designing a page for a public library. The content is: the history of the building, today's opening hours, a catalogue search box, a list of upcoming events, and a photo gallery. Sort these into core, supporting and optional tiers, and give the HTML source order.
Show answer
One reasonable answer: Core is today's opening hours and the catalogue search box, because most visitors come to find out whether the library is open or to look for a book. Supporting is the list of upcoming events. Optional is the photo gallery and the history of the building. Source order: opening hours, catalogue search, upcoming events, photo gallery, history. Other orders can be correct if you can justify them from user tasks, for example putting the gallery after the history.
Exercise
Why is it a poor choice to put the most important content last in the HTML and use CSS order to show it first?
Show answer
CSS reordering changes only the visual position. Keyboard users tabbing through the page and screen reader users still follow the HTML order, so they meet the least important content first and the visual and navigation orders disagree. The better fix is to put the content in the right order in the HTML.