Skip to content
AS & A Level Information Technology 9626 · Topic 21

Programming for the web: past paper questions

45 real questionsasked in 8 of the last 10 exam series2019–2025usually: Describe, Explain, Compare

Real questions on programming for the web

The newest 20 of 45 written questions. Open one to see it on the real paper.

  1. 9626/33 · October/November 2025 · Q7[6]

    The JavaScript code in Fig. 7.1 is executed when it is loaded into a web browser. The line numbers are for reference only. <html> <body> <p id="ALP3"></p> const qp = ["A Level", "IT", "9626", "Paper", 3]; let paper = ""; for (let x in qp) { paper += qp[x] + "<BR>"; } document.getElementById("ALP3").innerHTML = paper; <...

    See it on the paper →
  2. 9626/32 · May/June 2025 · Q9a[2]

    Describe the purpose of comparison operators.

    See it on the paper →
  3. 9626/32 · May/June 2025 · Q9b[4]

    Explain the differences in function between the === and !== comparison operators.

    See it on the paper →
  4. 9626/32 · February/March 2025 · Q1a[2]

    Describe what is meant by an HTML event.

    See it on the paper →
  5. 9626/32 · February/March 2025 · Q1b(i)[1]

    onmouseover()

    See it on the paper →
  6. 9626/32 · February/March 2025 · Q1b(ii)[1]

    onmouseout() (ii)

    See it on the paper →
  7. 9626/32 · February/March 2025 · Q1b(iii)[1]

    onload() (iii)

    See it on the paper →
  8. 9626/32 · October/November 2024 · Q1a[3]

    In JavaScript, the for loop has the following syntax: for (Statement_1; Statement_2; Statement_3){ // block of code to be executed is written here } Statement_1 Statement_2 Describe the purpose of each of the three statements: Statement_3

    See it on the paper →
  9. 9626/32 · October/November 2024 · Q1b[3]

    Compare the use of a for loop with a for in loop.

    See it on the paper →
  10. 9626/32 · May/June 2024 · Q4b[1]

    Describe one way that JavaScript code can add interactivity to a web page.

    See it on the paper →
  11. 9626/32 · May/June 2024 · Q4c[5]

    HTML events occur when users interact with a web page. Describe how JavaScript code can be made to react to an HTML event.

    See it on the paper →
  12. 9626/31 · October/November 2023 · Q7a(i)[1]

    operand

    See it on the paper →
  13. 9626/31 · October/November 2023 · Q7a(ii)[1]

    operator precedence

    See it on the paper →
  14. 9626/31 · October/November 2023 · Q7a(iii)[1]

    assignment operator

    See it on the paper →
  15. 9626/31 · October/November 2023 · Q7a(iv)[1]

    literals

    See it on the paper →
  16. 9626/31 · October/November 2023 · Q7b[1]

    JavaScript has its own group of reserved keywords which cannot be used as names for variables, labels or functions. Describe one other group of reserved words that should not be used when writing JavaScript code for use on web pages.

    See it on the paper →
  17. 9626/32 · February/March 2023 · Q8a[4]

    Describe the use of the switch operator, such as switch(name), in JavaScript code to select different actions.

    See it on the paper →
  18. 9626/32 · October/November 2022 · Q9a[1]

    Describe the purpose of strings in JavaScript.

    See it on the paper →
  19. 9626/32 · October/November 2022 · Q9b[4]

    The programmer’s first attempt at the HTML and JavaScript code is shown in Fig. 9.1. Line numbers are shown only for your use when referring to the code. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 <!DOCTYPE html> <html> <body> <h2>This is "Cambridge Assessment International Education"</h2> <p id="string"></p> <script> var x =...

    See it on the paper →
  20. 9626/32 · October/November 2022 · Q9c[5]

    JavaScript programmers often wish to control when sections of their code are executed. Compare the use of setTimeout() and setInterval() for delaying the execution of JavaScript code. Please turn over for Question 10.

    See it on the paper →

What examiners said

An HTML event is a change in a web page caused by a user or by the browser. Many learners referred to the user action but most did not correctly refer to the change in the web page. Common errors included inaccurate references to scripted dialogue boxes and alerts.

— Examiner report, February/March 2025, 9626/32 Q1(a) (Cambridge)

Good answers referred to the mouse pointer moving over or into an area of an element on a web page.

— Examiner report, February/March 2025, 9626/32 Q1(b)(i) (Cambridge)

Good answers referred to the mouse pointer moving from or out of an area of an element on a web page. A common error was to state that the event happens when the pointer is ‘not over’ the element of area. Such an answer is inaccurate as it implies that the mouse pointer could be anywhere on the screen to trigger the event. Answers must be precise in their meaning to gain credit.

— Examiner report, February/March 2025, 9626/32 Q1(b)(ii) (Cambridge)

Past papers, syllabus and examiner reports © UCLES (Cambridge University Press & Assessment). Questions are matched to topics from the official syllabus. AssessPro is independent and not endorsed by Cambridge.

Programming for the web — AS & A Level Information Technology 9626 past paper questions | AssessPro