Computer Science (H046, H446)
HTML CSS and JScript H406
Web Technologies
Diana Salama
13th December 2023
Please note that you may see slight differences
between this paper and the original.
Duration: Not set
Candidates answer on the Question paper.
OCR supplied materials:
Additional resources may be supplied with this paper.
Other materials required:
• Pencil
• Ruler (cm/mm)
Candidate Candidate
forename surname
Centre number Candidate number
INSTRUCTIONS TO CANDIDATES
• Write your name, centre number and candidate number in the boxes above. Please write clearly and in capital letters.
• Use black ink. HB pencil may be used for graphs and diagrams only.
• Answer all the questions, unless your teacher tells you otherwise.
• Read each question carefully. Make sure you know what you have to do before starting your answer.
• Where space is provided below the question, please write your answer there.
• You may use additional paper, or a specific Answer sheet if one is provided, but you must clearly show your candidate number, centre number
and question number(s).
INFORMATION FOR CANDIDATES
• The quality of written communication is assessed in questions marked with either a pencil or an asterisk. In History and Geography
a Quality of extended response question is marked with an asterisk, while a pencil is used for questions in which Spelling, punctuation and
grammar and the use of specialist terminology is assessed.
• The number of marks is given in brackets [ ] at the end of each question or part question.
• The total number of marks for this paper is 22.
• The total number of marks may take into account some 'either/or' question choices.
© OCR 2023. You may photocopy this Page 1 of 5 Created in ExamBuilder
page.
1. Laser Tag is a game where teams of players move round an arena shooting each other with infrared guns. Players wear sensors that
keep track of how many times they have been hit by the laser. This is known as being ‘tagged’.
Below is an extract from a Laser Tag company’s website:
The web page is written in HTML.
Write some HTML code which could have been used to produce this extract. You can assume it is already inside <body> tags.
<h1> Reason to Choose Us </h1>
<p>Come play laser tag with us for: </p>
<ul>
<li>State of the art equipment</li>
<li>Friendly staff</li>
<li>Match recordings available to purchase</li>
<li>Buy two games get one free</li>
</ul>
[4]
2. A theatre has a website showing its productions and allowing people to make bookings.
Part of the site is shown below. The words ‘Book tickets’ link to the page ‘[Link]’.
Upcoming productions:
1. Macbeth
2. Blood Brothers
3. An Inspector Calls
Book tickets
Write the HTML code for the extract above.
<ol>
<li>Macbeth</li>
<li>Blood Brothers</li>
<li>An Inspector Calls</li>
</ol>
<a href=“[Link]”> Book tickets </a>
© OCR 2023. You may photocopy this Page 2 of 5 Created in ExamBuilder
page.
[3]
3. The following JavaScript has been found to crash certain web browsers.
[Link]() converts j to a string. It is the JavaScript equivalent to str(j).
Complete the table below.
Line Effect of Code
1 Set the value of total ,declare the total function [2]
2 Give an condition to start for loop [1]
3
4 Calculate the new value of total [1]
5 Pushes total onto a stack that holds the browser’s history.
6
4(a). A theatre has a website showing its productions and allowing people to make bookings.
Part of the site is shown below. The words ‘Book tickets’ link to the page ‘[Link]’.
Upcoming productions:
1. Macbeth
2. Blood Brothers
3. An Inspector Calls
Book tickets
The theatre website also uses CSS.
Give an example of why the theatre website might use CSS.
To set the theme of the website.
[1]
(b). The theatre offers price reductions on Tuesdays and Wednesdays.
The theatre manager wants some text on the website to display “Midweek Special – tickets £15 tonight” on Tuesdays and Wednesdays,
and “Tickets £20 tonight” on all other nights.
The website coders will use a div tag with the id ‘prices’ to do this. The Javascript code to change the contents of the div tag has been
started below. The variable dayCode holds a number representing the current day of the week (0 for Sunday, 1 for Monday, 2 for Tuesday
and so on).
Complete the Javascript code below so the correct message is displayed in a div tag with the id ‘prices’.
var date = new Date();
© OCR 2023. You may photocopy this Page 3 of 5 Created in ExamBuilder
page.
var dayCode = [Link]();
/0 is Sunday, 1 Monday, 2 Tuesday etc
var priceText="";
?????????????
= priceText;
[4]
5. Shreya is a web developer who creates webpages for a variety of different companies.
Shreya has received a webpage written in HTML shown in Fig. 2.1.
Fig. 2.1
Some of the formatting requirements for this webpage are shown in Fig. 2.2.
Formatting Requirements
Class/ID Text font-family colour
History of the BBC
Beeb times green
Micro Computer
Model A
model arial red
Model B
Fig. 2.2
Write the CSS Shreya needs to display the webpage so that it meets the formatting requirements stated in Fig 2.2.
Beeb{
colour: green ;
font-family: times;
} © OCR 2023. You may photocopy this Page 4 of 5 Created in ExamBuilder
page.
model{
colour: red;
font-family: arial;
}
[6]
END OF QUESTION PAPER
© OCR 2023. You may photocopy this Page 5 of 5 Created in ExamBuilder
page.