Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

HTML Module 8

Interactive HTML with little JavaScript interview questions

Interview questions on interactive HTML with little JavaScript: warm-ups, then what each harder question tests and how a good answer starts.

3 questions: 1 warm-up and 2 with model answers · Levels: Fresher to staff

Warm-up questions

Short questions with short answers, each answered in full.

  1. Fresher

    What does the browser do for you when you use details and summary instead of a div and a script?

    Answered in the lesson Disclosures and accordions with details

Questions with model answers

What each question tests, the first step of a good answer and the follow-ups to expect.

  1. Mid to staff

    Your design system's accordion is built from div, button and aria-expanded, with arrow-key navigation between headers. A teammate proposes rebuilding it with details and summary. What do you gain, what could you lose, and how do you migrate without breaking users?

    What it tests
    Native disclosure semantics against the ARIA accordion pattern, keyboard expectations, headings inside summary, and testing a migration across engines and screen readers.
    First step
    List what each version gives users. details provides Tab, Enter and Space, the expanded state, find-in-page and link reveal, and exclusive groups through name, with no script. The ARIA version can add arrow keys and keeps its headings outside the button. Check what people rely on before deciding.
    Follow-ups

    From the lesson Disclosures and accordions with details

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes

All HTML interview questions · The HTML track

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.