Can you find your train’s platform on a phone with the text enlarged?
Your train leaves Galway soon. You open the departure board on your phone with the text at two hundred per cent. Can you find the platform without swiping sideways? A desktop screenshot might look great and still leave you stuck.
First list what the passenger needs: destination, departure time and platform. In SQL, create a table with text, time and whole-number fields, then add a departure. When the passenger chooses Dublin Heuston, this query retrieves the matching departures. The website puts each result in its own HTML article.
The viewport setting tells the phone to lay out the page at the device’s width. Next, the selector, dot results followed by article, matches articles inside the results area. Padding leaves space between a card’s content and its edges. Below the rule, you can see the article’s heading and departure details.
Your page has train cards inside the results section and a news article below it. You apply the rule you just saw. Which elements get the extra space inside their edges? Pick the group that matches the selector.
Compare two colour choices for the same departure details. Light grey on white gives about two point three two to one. Black on white gives twenty-one to one. Set the text and background colours together, then check that normal-sized text meets the accessibility target of at least four point five to one.
The results section becomes a grid. A gap separates the cards, which start in a single column. Read the media query next: when the browser’s viewport reaches forty rem, the rule changes the grid to two equal columns. The departure details stay the same.
Here, forty rem is six hundred and forty CSS pixels. At nine hundred and sixty, use two columns. Take the sixteen-pixel gap from the eight-hundred-and-eighty-pixel grid and halve what’s left. At three hundred and twenty, use one column. It takes the full two-hundred-and-eighty-eight-pixel grid width.
The browser is wide enough for two columns. This time, the results grid is seven hundred and thirty-six CSS pixels wide, with a sixteen-pixel gap between the columns. How wide is each column? Pick an answer.
Double the displayed text size and open the same departure on desktop and phone. The destination might wrap on the phone. On both screens, check that the time and platform are readable without clipping, overlap or sideways scrolling. A desktop screenshot alone can’t tell you how the phone behaves.
If an exam question asks how you tested a user requirement, name the task first. Ask someone to find the platform with the text doubled on both screens. Record whether they can do it without sideways scrolling. If the card clips the platform, fix the CSS and repeat both tests.