You are buying a train ticket in an app. The photos are good, the colours are pleasant, and the buttons are neat. But the total you have to pay appears only after you enter your card details. You also cannot tell whether the "Continue" button takes the money right away. Nothing on the screen looks bad. What makes you hesitate is how the app feels when you use it.
How a screen looks and how it feels to use are two different things, and both have names. UI (User Interface) is everything you see and touch on a screen: text, colours, buttons, photos, icons and how they are arranged. UX (User Experience) is the experience of using it: can people reach their goal easily, quickly and without getting confused?
Think of a restaurant. The decor, the table layout, the menu design and the way the food is presented are the restaurant's UI: what you see. The restaurant's UX is your whole experience: walking in, ordering, waiting, eating and paying. A beautiful restaurant where the food comes late and the orders are often wrong still disappoints.
UI: what you see and touch
UI is the part you can point at with a finger:
- Text: the font (the style of the letters), its size, and how thick it is.
- Colour: the colour of the background, the text and the buttons.
- Components: buttons, forms (fields to fill in), cards, icons, photos.
- Layout and spacing: what sits next to what, and how close the parts are.
UI answers questions like: "Is it nice to look at? Can I tell which thing is the button?"
UX: does the task get done
UX always starts from a task: the thing a user wants to get done, such as "book a room for two nights". Good UX lets the user finish that task in few steps, with few mistakes, and without having to ask anybody. That is why UX can be counted:
- how many steps until the task is done,
- how many times people slip (make a mistake) or have to go back a step,
- how many questions are still left in the user's head.
Steve Krug, a UX expert, summed this up in the title of his book, Don't Make Me Think (first published in 2000). His point: people should not have to think hard just to use one page.
The example for this whole track: the Mist Homestay booking page
Mrs. Sri runs a small homestay (a guest house in a family home) in the mountains, called Mist Homestay. Guests book a room on one web page: they pick the number of nights, then press a button. We will keep improving this page in the lessons that follow.
The guest's task: book the Terrace Room for 2 nights, checking in on 12 Dec. The room costs $35 a night. Below is the HTML code for the bottom of that page, in two versions. Each line is one part of the page, and the name of the part is in the quotes after the word class.
<!-- First version -->
<p class="price">$35 / night</p>
<button class="book">Submit</button>
<!-- Version with the UX fixed -->
<p class="price">$35 / night</p>
<p class="total">2 nights × $35 = <b>$70</b></p>
<button class="book">Book the room, pay on arrival</button>
<p class="note">Free cancellation up to 3 days before check-in.</p>
- In the fixed version,
.total(the line named total) writes out the price calculation, so the guest does not have to calculate 2 × $35 themselves. - The label on the button now says what happens when you press it. The label "Submit" in the first version explains nothing: does it charge me now, or does it only book?
.note(the note under the button) answers the question "what if I cancel?" before the guest starts to hesitate.
Now count the guest's steps in each version:
| Guest's step | First version | UX fixed |
|---|---|---|
| Pick 2 nights | needed | needed |
| Work out the total themselves | needed | not needed |
| Message Mrs. Sri: "Does Submit charge me straight away?" | needed | not needed |
| Message Mrs. Sri: "If I cancel, do I get my money back?" | needed | not needed |
| Press the book button | needed | needed |
| Total | 5 steps, 2 messages | 2 steps, 0 messages |
Between the two versions, not a single colour or font changes. Only the content of the page and its flow (the order of steps the guest goes through) change.
Good UI doesn't mean good UX
Imagine the first version with a beautiful UI: a tidy font, green accents, a picture of the misty garden, rounded corners with a soft shadow. The page is far nicer to look at, but the guest still needs 5 steps, 2 of them messages to Mrs. Sri. The UI is good, the UX is bad.
So when a booking page has a lovely photo but never writes the total price, the problem is in the UX. The page looks tidy (good UI), but the guest has to do the calculation or ask first before daring to book (bad UX). Another example: a website that looks great, but whose checkout flow (the steps for paying) is confusing.
The reverse can happen too: a plain black and white page, but the total is clear and the button says what happens. The UI is basic, the UX is good. The goal, of course, is to make both good. UI is also part of UX. Take a button that is too small on a phone: that is a problem of looks, but the result is that people tap the wrong thing.
Why developers need to understand UI/UX
Many UX decisions are actually made by developers: the label on a button, the error message, what appears while the page is loading, and whether the total is calculated automatically. A developer who understands UI/UX can:
- find UX problems before the page reaches users,
- talk with designers (the people who plan how the page looks) using the same terms,
- make the right small decisions without asking every time.
Clean code with bad UX still makes a bad product.
⚠️ Easy ways to misjudge UX
- Assuming that a beautiful UI means good UX. Check UX by counting a user's steps for one task, not by judging the colours.
- Judging by your own feeling. You already know how your page works, but your user does not. Ask one other person to try one task on your page, and note where they stop or ask a question.
- Adding features so that the page looks complete. Every extra form field and every extra button is one more decision for the user.
- Forgetting users with disabilities. In 2023 the WHO (the World Health Organization) estimated that 1.3 billion people live with significant disability. That is about 1 in 6 people worldwide. They cannot use a page that only works with sharp eyes and a mouse.
TL;DR: UI (User Interface) is what the user sees and touches on the screen: text, colour, buttons, photos and layout. UX (User Experience) is the experience of using it: does the user's task (the thing they want to get done) get done easily? UX can be counted in steps, mistakes and the questions left over. Think of a restaurant: the decor and the way the food is presented are the UI, and the whole experience from walking in to paying is the UX. A beautiful website with a confusing checkout (the paying process) has good UI and bad UX. In this track's example, the booking page of Mist Homestay, the guest's task goes from 5 steps to 2 after the total price is written out and the button label is made clear. Not a single colour changes.
⚡ UI is seen, UX is lived
Guess first: in a restaurant, are the decor and the way the food is presented UI or UX?
UI, because the decor and the presentation are what you see. The restaurant's UX is your whole experience: walking in, ordering, waiting, eating and paying.
Meaning: UI (User Interface) is everything you see and touch on a screen: text, colour, buttons, photos and layout. UX (User Experience) is the experience of using it: does the user's task, the thing they want to get done, get done easily?
⚡ UX can be counted
Write:
<p class="price">$35 / night</p>
<p class="total">2 nights × $35 = <b>$70</b></p>
<button class="book">Book the room, pay on arrival</button>
<p class="note">Free cancellation up to 3 days before check-in.</p>
Guess first: this is part of a homestay's booking page. The first version only has the price and a "Submit" button. How many steps until the guest dares to book?
5 steps, 2 of them messages to the owner. The guest has to pick 2 nights, work out the total, ask whether "Submit" charges right away, ask whether the money comes back after cancelling, then press the button. The version above needs 2 steps and 0 messages, without changing a single colour.
Meaning: UX is counted on one task: how many steps, how many slips, and how many questions are left over. In this code, the .total line (class total) writes out the price calculation, the button label says what happens when you press it, and the .note line (class note) answers the question about cancelling.
⚡ Beautiful isn't the same as easy
Meaning: An online shop that looks beautiful but has a confusing checkout (the paying process) has good UI and bad UX. Check UX by counting the user's steps for one task, not by judging the colours.