Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Preview

Front-end testing

This is the first page of the lesson. Read it and have a go at the activities. The rest is in the full lesson.

40 minutes

Fine on my laptop

A student builds a bus times page. On the laptop it looks great.

Then a friend opens it on a phone. The text is tiny. One box is cut off. The page takes ten seconds to load.

The code was correct. The page still failed its users. Front-end testing finds this.

Key words

WordWhat it meansExample
Front-endThe part of a product that the user sees and touches.A web page
BrowserThe program that opens web pages.Chrome, Firefox, Safari
RenderingHow the browser draws the page on the screen.Fonts, colours, layout
ResponsiveThe page changes to fit the size of the screen.One column on a phone
Loading timeHow long the page takes to appear.3 seconds
ScriptCode, such as JavaScript, that runs inside the page.A button that adds to a basket
Operating systemThe main software on a device.Windows, macOS, Android, iOS
Cross-browserWorks the same in more than one browser.Same page in Chrome and Safari
KB (kilobyte)A unit for the size of a file. A small picture is about 50 KB.
Media queryA CSS rule that only works on some screen sizes, such as a narrow phone.

The cells students fill in are left blank in this preview.

Seven front-end checks

CheckThe questionA way to test it
Script performance and functionalityDo the buttons and forms work? Are they fast?Click everything. Watch the browser console for errors
Browser compatibilityDoes it work in each browser we support?Open it in Chrome, Firefox, Safari and Edge
Operating system compatibilityDoes it work on each system?Try Windows, macOS, Android and iOS
Cross-browser performanceIs it equally fast in every browser?Time the same action in each browser
Formatting and renderingDoes it look right?Check fonts, colours, images and spacing
Loading timesDoes it appear quickly?Use the browser developer tools to time it
ResponsivenessDoes it fit every screen size?Resize the window. Use the device mode in developer tools

The cells students fill in are left blank in this preview.

Responsive pages

People use phones, tablets and big screens. A responsive page changes to fit.

The test is easy: make the window narrow and look. In the browser, press F12 for the developer tools. Then use the device mode to see a phone size.

Try it: a page that fits

Code: web
<h1>Bus times</h1>
<div class="box">Route 42</div>
<div class="box">Route 5A</div>

Look in the console

data-callouts.tip.label

A page can look fine and still have a broken script. Press F12 and open the Console tab. A red message there is a script error. Test every button, then check the console.

Loading times

A page is made of files: text, pictures and scripts. A big picture can slow the whole page.

We can work out the time. Time in seconds is the size divided by the speed. Sizes here are in KB.

Worked example: loading time

StepWhat we doNumber
1Page size2000 KB
2Phone download speed500 KB every second
3Divide the size by the speed: 2000 divided by 5004 seconds
4Our limit is 3 seconds, so the page isToo slow

The cells students fill in are left blank in this preview.

A quick fix

data-callouts.tip.label

The biggest file is often a picture. Make the picture file smaller and the page loads much faster.

The lesson goes on

2 more parts of this lesson are in the full curriculum, with the tasks, the final check and the labs. A college account gives your students all of it.