0% found this document useful (0 votes)
118 views15 pages

1.3.4 Web Technologies

The document provides information about laser tag games and JavaScript. It discusses laser tag rules and scoring, and explains that JavaScript is an interpreted programming language used to add interactivity and run code in web browsers. It also addresses using external CSS style sheets to make website formatting changes globally.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
118 views15 pages

1.3.4 Web Technologies

The document provides information about laser tag games and JavaScript. It discusses laser tag rules and scoring, and explains that JavaScript is an interpreted programming language used to add interactivity and run code in web browsers. It also addresses using external CSS style sheets to make website formatting changes globally.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

1(a).

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.

[4]

© OCR 2019. 1 of 15 PhysicsAndMathsTutor.com


(b). The website also includes JavaScript.

(i) Describe what is meant by the term JavaScript.

[2]

(ii) Explain why it is usually the case that JavaScript is interpreted rather than compiled.

[2]

© OCR 2019. 2 of 15 PhysicsAndMathsTutor.com


2(a). The Big Brains exam board has produced a website that allows students to access revision videos.

All pages in the site contain the following tag in the head section.

Describe one advantage of storing the CSS in an external file rather than it being embedded within HTML files.

[3]
(b). The exam board wants to limit access to those students with a school email account (i.e. one ending .sch.uk).
When students sign up JavaScript is used to check that the email address they have entered is from a school
account. The address is checked again when it reaches the server before login details are sent to the address.

Explain why it is important to check the email address with JavaScript and again when it reaches the server.

[3]

© OCR 2019. 3 of 15 PhysicsAndMathsTutor.com


3(a). A website has the following HTML code.

the site's owner wants to add the photo UKstamps.jpg in place of the comment

Write the code that should go in place of the comment

[2]
(b). Where the comment is, the site's owner wants to add the text:

Find out more about UK stamps as a link to the UK Stamp Collectors Guild website which has the URL:

http://ukstampcollectorsguild.co.uk

Write the code that should go in place of the comment

[2]

© OCR 2019. 4 of 15 PhysicsAndMathsTutor.com


(c). The site uses styling set out as attributes in tags rather than a linked CSS file.

(i) Give one disadvantage of this to the site's owner.

[1]

(ii) Give one disadvantage of this to the site's visitors.

[1]

(d). The site needs a light green (web colour lightGreen) background.
Explain what change needs to be made to the current page in order to do this.

[3]

© OCR 2019. 5 of 15 PhysicsAndMathsTutor.com


4. Elegant Bags is a company that makes designer handbags. It has decided it wants to sell its products online.

Elegant Bags puts its website on its servers which are given a public IP address. It also purchases the domain
name elegantbagsonline.co.uk.

The company's handbags come in a variety of materials. It would like visitors to its website to be able to select
different materials in their browser and for the image shown to then instantly change to one of a handbag made
of the selected material.

Explain how the website developer would implement this. You are not expected to write any code.

[4]

© OCR 2019. 6 of 15 PhysicsAndMathsTutor.com


5. The following JavaScript has been found to crash certain web browsers.

j.toString() converts j to a string. It is the JavaScript equivalent to str(j).

Complete the table below.

Line Effect of Code

1 [2]

2 [1]

4 [1]

5 Pushes total onto a stack that holds the browser’s history.

© OCR 2019. 7 of 15 PhysicsAndMathsTutor.com


6(a). A website contains the following HTML:

Explain the difference between a HTML id attribute and a HTML class attribute.

[2]

© OCR 2019. 8 of 15 PhysicsAndMathsTutor.com


(b). The html file is linked to the CSS file style.css

Text between h1 tags should be in the font Arial.

The customer quote should be on a background with the colour E8C3E1.

The introduction text should be dark red (using the named colour darkRed).

Write the code that should go in style.css to give this formatting.

[6]

© OCR 2019. 9 of 15 PhysicsAndMathsTutor.com


(c). The code between the script tags is supposed to display a different message during the shop’s opening hours
of 09:00 and 17:00.

(i) State the name of the language used between the script tags.

[1]

Some users have reported that there is a bug and the site says the shop is closed when they log on
between 9 and 10 in the morning.

(ii) Explain how this bug can be fixed.

[1]

(iii) Give one disadvantage of this code being run client side rather than server side.

[1]

END OF QUESTION PAPER

© OCR 2019. 10 of 15 PhysicsAndMathsTutor.com


Question Answer/Indicative content Marks Guidance

1 a Appropriate tags to make Reasons to 4 Up to 4 marks - 1 mark for each correct


Choose Us subheading (e.g. h1, h2, step in process.
h3). Accept b or strong if accompanied
by attribute to make increase font size Example:
(1).
Laser Tag italicised (e.g. i or em) (1).
ul used for bulleted list (1).
li to mark out elements of list (1).

Accept answers where same effect is


achieved using style attribute.

b i A programming language that runs in a 2 Up to 2 marks for a valid description.


web browser (1) that can be embedded
into HTML (1) with <script> tag (1) to
add interactivity to a page (1).

ii JavaScript is likely to be run on a 2 Up to 2 marks for a valid explanation.


variety of machines (1) with different
processors / architectures (1).
Compiled code is machine dependent
(1) whereas interpreters run on high
level code (1) which is machine
independent (1).

Total 8

2 a Content and formatting are kept 3 Up to 3 marks for a valid description.


separate (1). Changes can be made to
the external style sheet and affect the
whole site (1) saving time (1) and
ensuring consistency (1). Stylesheets
can be changed for different themes, or
different devices (1).

b The JavaScript check is carried out 3 Up to 3 marks for a valid explanation.


client-side / in browser (1) meaning
address can be checked and stopped
prior to reaching server (1) reducing
unnecessary load on the server (1).
JavaScript can, however, be amended
and circumvented (1) therefore
address must be checked at the server
to ensure this has not happened (1).

Total 6

© OCR 2019. 11 of 15 PhysicsAndMathsTutor.com


Question Answer/Indicative content Marks Guidance

3 a 2 Accept self closing tag:

– One mark for img tag


– One mark for correct src attribute

(1 per –)

b 2 <a href="http://ukstampcollecto
rsguild.co.uk">Find out More
about UK stamps</a>

(1 per –)

c i – Formatting code has to be rewritten for 1


every page
– Changes have to be made to every
page
– It is a lot of work to keep the look of the
site consistent.
(1 per –, max 1)

ii The site is slower to access (as the 1


formatting information is reloaded for every
page)

Unlikely to have formatting specific to their


device/needs.

d – Change the tag body … 3


– So it includes the attribute style

(1 per –)

Total 9

© OCR 2019. 12 of 15 PhysicsAndMathsTutor.com


Question Answer/Indicative content Marks Guidance

4 Page will include JavaScript (which 4 Allow alternative solution using JQuery or
allows page content to be dynamic) other library / plug-ins.
(AO2.2)
Accept AJAX can be used to prevent all
(1 per -, Max 1) images having to be pre-loaded.
Plus
Credit ‘replaces / changes previous picture
When a material is selected with new picture’ with BP 3 and 4 (i.e. 2
(JavaScript) code can be marks)
executed…(AO3.1)
…the appropriate picture is Examiner's Comments
shown…(AO3.1)
…and hides the original picture. Many candidates gained credit for correctly
(AO3.1) identifying that the change of image could
(1 per -, Max 3) be implemented using Javascript (or
similar). However, as with the previous
question many candidates then found it
difficult to explain how this could be
implemented. Too many candidates
rewrote the content of the question.

Total 4

5 1. Creates / declares / defines a variable 4 For point 1 accept ‘blank value’ for empty
(called total) (1) and assigns it an empty / string
blank (string). (1)
AO3.3 For point 4 accept add instead of
2. A loop that iterates 200,000 times. (1) concatenates only if it is clear it is building
a string and not adding a numeric value.
3. - Accept ‘append’.

4. Concatenates (the string version of) j to


total. (1) Examiner’s Comment
In general, candidates did not use
technical terminology when describing the
effect of the code e.g. declaring a variable,
assigning an empty string, concatenating
strings. Centres should encourage
candidates to use these and similar terms
in response to questions where they are
required to describe code.

Total 4

© OCR 2019. 13 of 15 PhysicsAndMathsTutor.com


Question Answer/Indicative content Marks Guidance

6 a Only one element can have a given 2


id / id is unique. (1)

Class can be used assigned to (AO1.1)


multiple elements / used multiple
times. (1) Examiner’s Comments
Those candidates who achieved credit on
this question, generally achieved both
marks.

b 6 .customerQuote must have . and


(AO3.1) opening and closing { } for 3rd mark.

#intro must have # and opening and


closing { } for 4th mark

Must match case sensitivity, except for


‘Arial’ and ‘darkRed’ and colour code
Allow quotes around Arial and darkRed

Examiner’s Comments
Few candidates scored more than two
marks on this question. There was a
general lack of attention to detail resulting
in fundamental mistakes e.g. missing close
bracket }; equals (=) instead of colon (:)
when setting attributes.

c i JavaScript 1 Cao do not accept Java

(AO1.1)

Examiner’s Comments
Well attempted by most candidates with
many scoring two out of a possible three
marks. Some candidates did not gain credit
in iii) because they cited ‘...time taken to
process’ as a disadvantage.

ii 1 Accept Change ‘greater than’ to ‘great than


or equal to’ or similar
(AO3.3)

© OCR 2019. 14 of 15 PhysicsAndMathsTutor.com


Question Answer/Indicative content Marks Guidance

iii – Won’t work if JavaScript is 1


disabled. (1)

– Shows incorrect message if user’s (AO2.2)


computer’s clock is wrong / in
different time zone. (1)

– (Source) code is visible allowing it


to be copied / modified. (1)

(Max 1)

Total 11

© OCR 2019. 15 of 15 PhysicsAndMathsTutor.com

Powered by TCPDF (www.tcpdf.org)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy