Skip to content
AI Exercises
–points–day streak

What you see: frontend, UI and UX, explained with switches

The frontend is everything you see and touch on a website. It's built from HTML (what's on the page), CSS (how it looks) and JavaScript (how it reacts). UI is the look and the controls; UX is how easy it is to get things done. Flip the switches on the toy page below to see each part's job, then compare two sign-up forms to see UX in action.

Flip the switches on a toy web page

Screen size

Switches

rosas-bakery.example
Rosa's Bakery
Basket (0)

Fresh bread, baked at 6am

Order by 10am, collect after lunch.

  • Sourdough loaf

    £4.00

  • Cinnamon bun

    £2.50

  • Lemon cake

    £3.00

This whole page is frontend. Flip the switches one at a time to see what each building block does.

Two sign-up forms: which one loses people?

Which form do you think loses more people?

Form A

Form A asks for nine things: First name, Last name, Email, Confirm email, Phone, Date of birth, Company, Fax number, Password, with no password hints and a small button labelled Submit.

Form B

Form B asks for an email and a password, shows the password rules as you type, and has a large Create account button.

Both forms do the same job and use similar colours. Make a guess, then send the visitors in.

The 8 words in this module

Each one has its own page with a demo and three quick questions. Work through them in order.

  1. What is the frontend?

    The frontend is everything you see and interact with on a website or app: the text, buttons, pictures and layout on your screen.

  2. What is UI (user interface)?

    UI is the look and controls of an app: the buttons, menus, text boxes, icons and colours you see and tap.

  3. What is UX (user experience)?

    UX is how easy and pleasant something is to use: whether people can do what they came to do without getting stuck or annoyed.

  4. What is HTML?

    HTML is the code that says what's on a web page: this is a heading, this is a paragraph, this is a button, this is a picture.

  5. What is CSS?

    CSS is the code that controls how a web page looks: colours, fonts, spacing and layout.

  6. What is JavaScript?

    JavaScript is the code that makes a web page react: opening menus, updating a basket or checking a form as you type.

  7. What is responsive design?

    Responsive design means a page rearranges itself to fit any screen, from a wide computer monitor to a small phone.

  8. What is a component in web design?

    A component is a reusable building block of a page, like a product card or a button, built once and used in many places.

Label parts of a screen as a UI element, a layout problem or a UX problem, then match each job to HTML, CSS or JavaScript.

Module check: name what you see

Question 1 of 2

Is each one a UI element, a layout problem or a UX problem?

  1. A "Buy now" button
  2. A search box
  3. A drop-down menu
  4. Text runs off the side of a phone screen
  5. Two pictures overlap and hide a heading
  6. Buttons squashed together on a phone
  7. The sign-up form asks for 12 details before you can start
  8. An error that only says "Error 4021"
  9. Checkout hides the delivery cost until the last step