Free practice questions

Technical
Interview questions

Prepare for technical interviews with questions by technology, clear explanations, step-by-step solutions and code you can run.

UI/UX Design questions
50 questions
25
25 concept questions
25
25 coding questions

UI/UX Design technical questions

User Research, Wireframing, Design Systems, Accessibility (WCAG), Usability Testing & Interactive CSS/JS Components
Total 50 Questions
Part A: Core concept & theory questions
Questions 01 to 25 • Theoretical Foundations
25 Concept Questions

UX design is about how a product feels to use. I ask whether people can do what they came to do without getting stuck or annoyed.

UI design is the look of the product: buttons, colors, fonts, icons and spacing. It's what the user actually sees and taps.

UX is the whole journey and UI is the surface. A good-looking app that is hard to use has strong UI but weak UX.

Empathize, define, ideate, prototype and test. I often go back a stage when testing shows a problem.

Because I am not my user. Interviews, surveys and observation show what people really need, so I don't design from guesses.

A made-up but research-based user profile with goals, habits and frustrations. It keeps the team thinking about a real person.

A timeline of the steps a user takes to reach a goal, with their feelings at each step. It shows where they get frustrated.

How content is grouped and labeled so people can find it. Menus, categories and page structure are all part of it.

A wireframe is a plain layout sketch. A mockup adds color, fonts and images. A prototype is clickable so I can test how it behaves.

Low-fidelity is rough and fast, like paper sketches, and is good for early ideas. High-fidelity looks like the final product and is used for polish and handoff.

Ten general rules for good interfaces, written by Jakob Nielsen. Examples are showing system status, preventing errors and staying consistent.

Arranging elements so the most important thing gets noticed first. I use size, color, contrast and position for this.

It gives content room to breathe, separates groups and guides the eye. A crowded screen is tiring to read.

One main brand color, some neutrals for text and backgrounds, and status colors for success, warning and error. I use mostly neutral with a small accent.

For level AA, normal text needs a 4.5:1 contrast ratio and large text needs 3:1. Low contrast is hard to read for many people.

One or two fonts, body text of about 16px, line height near 1.5, and lines of 50 to 75 characters. Size and weight show importance.

Making the product usable by people with disabilities, like low vision or limited movement. It also helps everyone in tough situations, such as bright sunlight.

Enough contrast, alt text on images, labels on form fields, keyboard access, a visible focus outline, and not using color alone to carry meaning.

A layout that adjusts to any screen size using flexible grids and breakpoints. Mobile-first means I design the small screen first.

A shared library of components, styles and rules, like buttons, colors and spacing. It keeps a product consistent and speeds up work.

Named style values like color-primary or space-4. If I change a token once, every place that uses it updates.

Large, close targets are faster to reach. So key buttons should be big and easy to tap.

More choices mean slower decisions. I keep menus short and hide rarely used options.

Watching real people try tasks on my design and noting where they struggle. A small group of about five can show most big problems.

Tricks that push users into things they didn't mean to do, like hidden unsubscribe links or pre-ticked boxes. They hurt trust and can break consumer rules.

Part B: Coding questions & algorithm solutions
Questions 01 to 25 • Runnable Solution Scripts
25 Coding Questions

Define global tokens inside :root with custom property variables.

UI/UX Design Solution
:root {
  --brand: #0f766e;
  --text: #1e293b;
  --bg: #ffffff;
  --gap: 16px;
  --round: 10px;
}
body { color: var(--text); background: var(--bg); }

Use prefers-color-scheme media query to rebind root CSS variables.

UI/UX Design Solution
@media (prefers-color-scheme: dark) {
  :root { --text: #e2e8f0; --bg: #0f172a; }
}

Define interactive pseudo-classes including :focus-visible and :disabled.

UI/UX Design Solution
.btn {
  background: var(--brand);
  color: #fff;
  padding: 10px 22px;
  border: 0;
  border-radius: var(--round);
  cursor: pointer;
  transition: filter .2s;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

Position skip link off-screen until focused with keyboard tab.

UI/UX Design Solution
<!-- HTML -->
<a class="skip" href="#main">Skip to content</a>
<main id="main">Page content</main>

/* CSS */
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 10px; top: 10px; background: #fff; padding: 8px; z-index: 999; }

Use CSS clamp() for fluid typography and set max-width line length in ch units.

UI/UX Design Solution
h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
p  { line-height: 1.6; max-width: 65ch; }

Combine CSS grid with repeat(auto-fit, minmax(240px, 1fr)).

UI/UX Design Solution
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
}

Set mobile default block display and apply grid layout at min-width 800px breakpoint.

UI/UX Design Solution
.page { display: block; }
@media (min-width: 800px) {
  .page { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
}

Combine box-shadow elevation with translateY transform transition.

UI/UX Design Solution
.card {
  padding: 20px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.14); }

Use label element, aria-invalid attribute, and aria-describedby pointing to error alert.

UI/UX Design Solution
<label for="mail">Email</label>
<input id="mail" type="email" aria-invalid="true" aria-describedby="mail-err">
<p id="mail-err" role="alert">Enter a valid email address.</p>

Validate field on blur event and toggle aria-invalid and hidden attributes.

UI/UX Design Solution
const field = document.querySelector("#mail");
const err = document.querySelector("#mail-err");

field.addEventListener("blur", () => {
  const valid = field.checkValidity();
  field.setAttribute("aria-invalid", String(!valid));
  err.hidden = valid;
});

Use native semantic <details> and <summary> HTML elements.

UI/UX Design Solution
<details>
  <summary>How long does delivery take?</summary>
  <p>Usually 3 to 5 working days.</p>
</details>

Control native HTML <dialog> with showModal() and close() methods.

UI/UX Design Solution
<button id="openBtn">Open</button>
<dialog id="dlg">
  <p>Delete this item?</p>
  <button id="closeBtn">Cancel</button>
</dialog>
<script>
  const dlg = document.querySelector("#dlg");
  openBtn.onclick = () => dlg.showModal();
  closeBtn.onclick = () => dlg.close();
</script>

Use button with role='switch' and toggle aria-checked boolean state.

UI/UX Design Solution
<button id="sw" role="switch" aria-checked="false">Notifications</button>
<script>
  sw.addEventListener("click", () => {
    const on = sw.getAttribute("aria-checked") === "true";
    sw.setAttribute("aria-checked", String(!on));
  });
</script>

Implement accessible tab pattern with role='tablist', role='tab', and role='tabpanel'.

UI/UX Design Solution
<div role="tablist">
  <button role="tab" aria-selected="true" data-p="a">Details</button>
  <button role="tab" aria-selected="false" data-p="b">Reviews</button>
</div>
<div id="a" role="tabpanel">Details here</div>
<div id="b" role="tabpanel" hidden>Reviews here</div>
<script>
  document.querySelectorAll("[role=tab]").forEach(t => {
    t.onclick = () => {
      document.querySelectorAll("[role=tab]").forEach(x => {
        x.setAttribute("aria-selected", x === t);
        document.getElementById(x.dataset.p).hidden = x !== t;
      });
    };
  });
</script>

Animate background-position over linear-gradient with infinite keyframes.

UI/UX Design Solution
.skel {
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: shine 1.2s infinite;
}
@keyframes shine { to { background-position: -200% 0; } }

Override all transitions and animations inside prefers-reduced-motion media query.

UI/UX Design Solution
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

Dynamically construct fixed status element with role='status' and remove on setTimeout.

UI/UX Design Solution
function toast(msg) {
  const el = document.createElement("div");
  el.textContent = msg;
  el.setAttribute("role", "status");
  el.style.cssText = "position:fixed;bottom:20px;right:20px;background:#111;color:#fff;padding:12px 16px;border-radius:8px;z-index:9999;";
  document.body.append(el);
  setTimeout(() => el.remove(), 3000);
}

Apply position: sticky, top: 0 and z-index to header element.

UI/UX Design Solution
.header {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid #e2e8f0;
  z-index: 10;
}

Enforce WCAG 2.5.5 minimum 44x44px touch target dimensions.

UI/UX Design Solution
button, .icon-btn { min-width: 44px; min-height: 44px; }

Declare explicit width and height attributes with object-fit: cover.

UI/UX Design Solution
<!-- HTML -->
<img src="team.jpg" alt="Team at work" width="600" height="400" loading="lazy">

/* CSS */
img { max-width: 100%; height: auto; object-fit: cover; }

Use nav aria-label='Breadcrumb' with ordered list and slash pseudo-element dividers.

UI/UX Design Solution
<!-- HTML -->
<nav aria-label="Breadcrumb">
  <ol class="crumbs">
    <li><a href="/">Home</a></li>
    <li><a href="/shop">Shop</a></li>
    <li aria-current="page">Shoes</li>
  </ol>
</nav>

/* CSS */
.crumbs { display: flex; gap: 8px; list-style: none; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 8px; }

Persist selected theme in localStorage and toggle data-theme attribute on root element.

UI/UX Design Solution
// JS
const root = document.documentElement;
root.dataset.theme = localStorage.getItem("theme") || "light";

document.querySelector("#themeBtn").onclick = () => {
  root.dataset.theme = root.dataset.theme === "dark" ? "light" : "dark";
  localStorage.setItem("theme", root.dataset.theme);
};

/* CSS */
[data-theme="dark"] { --bg: #0f172a; --text: #e2e8f0; }

Style semantic HTML <progress> element with accent-color property.

UI/UX Design Solution
<!-- HTML -->
<progress value="60" max="100" aria-label="Upload progress"></progress>

/* CSS */
progress { width: 100%; height: 12px; accent-color: var(--brand); }

Define container-type: inline-size and evaluate rules inside @container query.

UI/UX Design Solution
.box { container-type: inline-size; }
.item { display: block; }
@container (min-width: 480px) {
  .item { display: flex; gap: 16px; }
}

Use :focus-visible pseudo-class with outline and outline-offset.

UI/UX Design Solution
:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

No Matching Questions Found

Try searching for keywords like "JWT", "Express", "useEffect", "PDO", "GIL", or "schema".

Technical Panel Preparation

Ready to Benchmark Your Technical Skills?

Connect with DigitalXNode expert interviewers for technical mock interviews, domain assessment, and enterprise job placement.

1