Programming for the web – A Level Information Technology (9626)
66 questions · page 1 of 5 · Clear filters
Question text
7
Evaluate the incremental method of software development.
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
… [8]
© Cambridge University Press & Assessment 2026
Question text
11
The code displays a person’s full name (given name and family name) when it is entered into a
web page. The line numbers are shown only for reference.
1
<html>
2
<body>
3
<h2>This code collects a person's name and displays it</h2>
4
<br>
5
<br>
6
<p id="id1"></p>
7
<script>
8
var a = "Your name is "
9
const GName = prompt("Your given name please...");
10
const FName = prompt("Your family name please...");
11
document.getElementById("id1").innerHTML = a + GName + " " + FName;
12
</script>
13
</body>
14
</html>
Describe how the code collects and processes the given and family names so that the full name
can be displayed on the web page.
…
…
…
…
…
…
…
…
…
…
…
…
…
… [6]
© Cambridge University Press & Assessment 2026
Question text
1
Data that is output from JavaScript code is passed to HTML so that a web browser can display it.
A web page displays the name of a question paper in a web browser. The emboldened title of the
page is created by HTML code, but the name of the question paper is output by JavaScript code
and is displayed.
File
C:/9626.html
This code displays the question paper name in a web browser
Paper 3 Advanced Theory 9626/32
The web page code is shown. The line numbers are only for reference.
1
<html>
2
<body>
3
<h2>This code displays the question paper name in a web browser</h2>
4
<br>
5
<br>
6
<p id="QPname"></p>
7
8
<script>
9
var a = "9626/32";
10
var b = "Paper 3 Advanced Theory";
11
document.getElementById("QPname").innerHTML = b + " " + a;
12
</script>
13
14
</body>
15
</html>
© Cambridge University Press & Assessment 2026
,
,
Describe how the code processes and passes the name of the question paper to the web
browser for display.
…
…
…
…
…
…
…
…
…
…
…
…
…
… [6]
© Cambridge University Press & Assessment 2026
Question text
9
HTML elements can be hidden from view by the display property.
(a) The display property of an element can be set using the JavaScript statement:
document.getElementById(id).style.display = "none"
Describe how this statement is used in JavaScript to hide HTML elements.
…
…
…
…
…
…
…
…
…
… [4]
(b) HTML elements can also be hidden using the visibility property in the JavaScript statement:
document.getElementById(id).style.visibility = "hidden"
Explain why JavaScript programmers prefer to use this statement instead of the statement
given in 9(a).
…
…
…
…
…
…
…
… [3]
© Cambridge University Press & Assessment 2026
Question text
1
The visibility of HTML elements in a webpage can be controlled by JavaScript statements that
change the style property.
The statement below sets the style property of an element to a default value.
document.getElementById(id).style.visibility = "initial"
Describe how this statement is used in JavaScript to alter the appearance of HTML elements.
…
…
…
…
…
…
…
…
…
…
…
…
…
… [6]
© Cambridge University Press & Assessment 2026
Question text
2
The content of web pages is displayed in a web browser. The web browser obtains the content
from a web server.
Describe, in detail, how the request and response method of communication between a web
browser and a web server functions.
…
…
…
…
…
…
…
…
…
…
…
…
…
… [6]
© Cambridge University Press & Assessment 2026
Question text
10 JavaScript code can be executed when an HTML event happens in a web browser. An example of
an HTML event is when a user clicks a mouse button.
(a) Describe how the JavaScript in this HTML code changes the display of text on the web page
when a mouse button is clicked.
The line numbers are included for reference only.
1
<html>
2
<body>
3
4
<h2>Cambridge International JS Code: HTML Event</h2>
5
<h2 onclick="changeText(this)">Click on this line to see the name
of this 9626 QP</h2>
6
7
<script>
8
function changeText(id) {
9
id.innerHTML = "A Level IT Paper 3";
10
}
11
</script>
12
13 </body>
14 </html>
…
…
…
…
…
…
…
…
…
… [4]
(b) Describe two other HTML events that can be used to trigger the execution of JavaScript
code.
…
…
…
…
…
… [2]
ĬÛú¾Ġ´íÈõÏĪÅĊàü·þ×
Question text
5
Message switching can be used in networks to transfer data between devices.
(a) Describe how message switching transfers data between devices.
…
…
…
…
…
…
…
… [3]
(b) Explain why message switching is used to transfer data.
…
…
…
…
…
…
…
…
… [4]
ĬÙú¾Ġ´íÈõÏĪÅĊßüµþ×
Question text
7
The JavaScript code in Fig. 7.1 is executed when it is loaded into a web browser.
The line numbers are for reference only.
1
<html>
2
<body>
3
4
<p id="ALP3"></p>
5
6
<script>
7
8
const qp = ["A Level", "IT", "9626", "Paper", 3];
9
10
let paper = "";
11
for (let x in qp) {
12
paper += qp[x] + "<BR>";
13
}
14
15
document.getElementById("ALP3").innerHTML = paper;
16
17
</script>
18
19
</body>
20
</html>
Fig. 7.1
Explain how the code produces the list shown in Fig.7.2.
File | M:/CIE/202...
A Level
IT
9626
Paper
3
Fig. 7.2
ĬÙú¾Ġ´íÈõÏĪÅĊÝüµĀ×
,
,
…
…
…
…
…
…
…
…
…
…
…
…
…
… [6]
ĬÛú¾Ġ´íÈõÏĪÅĊÝúµĀ×
Question text
8
In computer animation, objects can be made to appear to move at different speeds.
Describe how an animator can control the speed at which objects appear to move.
…
…
…
…
…
…
…
…
…
…
…
…
…
… [6]
Question text
4
Arithmetic on numbers in JavaScript is carried out by using operators. Addition and subtraction
are carried out by the + and – operators.
(a) Describe the use of each of these arithmetic operators.
(i)
++
…
…
… [1]
(ii)
**
…
…
…
…
…
… [2]
(b) Describe the use of two other arithmetic operators in JavaScript.
…
…
…
…
…
…
…
…
…
… [4]
Ĭ×ú¾Ġ´íÈõÏĪÅĊÝú¸Ā×
Question text
8
A shopper is using the internet to look at the website of an online store. A web browser is used to
fetch and display web pages from the store’s web servers.
Explain how the web server provides the web browser with the content of the store’s web pages.
…
…
…
…
…
…
…
…
…
…
…
…
…
… [6]
ĬÛú¾Ġ´íÈõÏĪÅĊÞüµĀ×
Question text
9
JavaScript statements can contain comparison operators such as > and <.
(a) Describe the purpose of comparison operators.
…
…
…
…
…
… [2]
(b) Explain the differences in function between the === and !== comparison operators.
…
…
…
…
…
…
…
…
…
… [4]
ĬÙú¾Ġ´íÈõÏĪÅĊÝû·þ×
Question text
1
Programmers can use JavaScript to make a web page react when an HTML event occurs.
(a) Describe what is meant by an HTML event.
…
…
…
…
…
… [2]
(b) Describe the action that causes each of the following HTML events to start.
(i)
onmouseover()
…
…
… [1]
(ii)
onmouseout()
…
…
… [1]
(iii)
onload()
…
…
… [1]
ĬÕú¾Ġ´íÈõÏĪÅĊÞú¸þ×
Question text
1
JavaScript uses for loops to run through a block of code.
(a) 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
}
Describe the purpose of each of the three statements:
Statement_1
…
…
…
Statement_2
…
…
…
Statement_3
…
…
…
[3]
(b) Compare the use of a for loop with a for in loop.
…
…
…
…
…
…
…
… [3]
ĬÕú¾Ġ´íÈõÏĪÅĊàû·þ×