BREAKING
Student's code works, nobody knows why, including student★Local teen writes pseudocode, accidentally invents a language★Binary joke told in class, exactly 10 students laugh★
  1. Home
  2. A Level
  3. Computer Science
  4. OCR
  5. HTML, CSS and JavaScript

OCR A Level Computer Science

Topic questions Exchanging data HTML, CSS and JavaScript

HTML, CSS and JavaScript

6 questions · 116 marks · about 2 hours

HTML, CSS and JavaScript questions

TopicHTML, CSS and JavaScript

OCR H446 HTML, CSS and JavaScript 6 questions

Computer systems June 2025, Question 8 16 marks

Orla is developing a program that will allow candidates to complete quizzes for a range of subjects. Each quiz has three questions and each one is multiple choice with three possible answers.

(a)

Orla is considering using a flat file database to store data about candidates, and the subjects and quizzes they sit.

Explain the limitations of using flat file databases.

[4]
Reveal mark scheme Mark scheme for question 8(a)
(b)
Figure for question 8 Figure for question 8
[3]
Reveal mark scheme Mark scheme for question 8(b)
(c)

In order to determine what tables were required, Orla used database normalisation.

(c)(i)

State two requirements for a database to be in Second Normal Form (2NF).

[2]
Reveal mark scheme Mark scheme for question 8(c)(i)
(c)(ii)

State two requirements for a database to be in Third Normal Form (3NF).

[2]
Reveal mark scheme Mark scheme for question 8(c)(ii)
(d)

Orla wants a web based version of the quiz. She develops a function called checkAnswers to calculate the score of each quiz on the client side using JavaScript.

Next to each candidate answer is an empty HTML element. When the user presses submit, the function, checkAnswers, will check if each answer is correct. If so, it will add the word "Correct" into the empty HTML element.

The function, checkAnswers takes three parameters:

• responses – an array of the IDs of the HTML elements that contains the user’s responses.

• feedbacks – an array of the IDs of the HTML elements that the text "Correct" is to be written to if the candidate gets the question right. The array will be the same length as responses.

• answers – an array of the correct answer for each of the questions. The array will be the same length as responses.

The function returns the final score out of three for the quiz. It loops through each question to calculate if the candidate got it correct and processes it appropriately if they did.

Complete the function checkAnswers, using pseudocode or program code.

Figure for question 8
[5]
Reveal mark scheme Mark scheme for question 8(d)

Computer systems June 2023, Question 4 35 marks

Also involves High-level and low-level languages

A team of programmers create a robot that will be used in a factory. The robot will be able to do the work of multiple humans.

The programmers discuss whether to write the instructions for the robot in assembly language or a high-level language.

(a)

Describe two differences between assembly language and high-level languages.

[4]
Reveal mark scheme Mark scheme for question 4(a)
(b)

The robot uses a multi-core processor. The programmers assume that this means that the robot will execute programs more quickly than using a single core processor.

(b)(i)

Give one reason why this assumption can sometimes be true.

[1]
Reveal mark scheme Mark scheme for question 4(b)(i)
(b)(ii)

Explain why this assumption is not always true.

[2]
Reveal mark scheme Mark scheme for question 4(b)(ii)
(c)

* The robot stores data internally and also communicates with other robots and users via a wireless network which is password protected. All data for these tasks is secured using either encryption or hashing.

Compare the robot’s use of encryption and hashing for storing and communicating data.

You should include the following in your answer:

• the different types of encryption that could be used and how this would secure data

• how hashing could be used to secure data and which data would be suitable

• why encryption and hashing are used by the robot for stored data and communications.

[9]
Reveal mark scheme Mark scheme for question 4(c)
(d)

The robot provides a web-based interface for users. The home screen webpage for this interface is shown in Fig. 4.

Figure for question 4
(d)(i)
Figure for question 4
[5]
Reveal mark scheme Mark scheme for question 4(d)(i)
(d)(ii)

Write CSS code that could be used in an external stylesheet to format all text using the <h1> tag as white with a red background.

[3]
Reveal mark scheme Mark scheme for question 4(d)(ii)
(e)

The robot’s web interface uses images that show the robot in action. These photographs have been taken using a digital camera.

The programmers do not want other people to download and use these images.

(e)(i)

State the name of one relevant piece of legislation and describe how this would protect these images.

[3]
Reveal mark scheme Mark scheme for question 4(e)(i)
(e)(ii)

For other areas of the web interface, the programmers need to use images that they have not created themselves.

Give two ways that they could make sure these images are used legally.

[2]
Reveal mark scheme Mark scheme for question 4(e)(ii)
(f)

Details of all users that have accessed the robot are stored in a database table called TblAccessLog. This table stores the username and user type of each user. When a user accesses the robot, the current date is added to the DateAccessed field for that user.

A selection of the data from this table is shown here. Username is the key field.

Figure for question 4
(f)(i)

Write an SQL statement to delete all records from the table TblAccessLog for users who have a UserType of "NotNeeded".

[2]
Reveal mark scheme Mark scheme for question 4(f)(i)
(f)(ii)

State two requirements for a database to be in First Normal Form (1NF).

[2]
Reveal mark scheme Mark scheme for question 4(f)(ii)
(f)(iii)

Explain why the structure of TblAccessLog means that this database is not in First Normal Form (1NF).

[2]
Reveal mark scheme Mark scheme for question 4(f)(iii)

Computer systems November 2021, Question 3 23 marks

A website sells tickets for sporting events. The website uses HTML, CSS and JavaScript.

(a)

Describe the purpose of HTML and CSS within the code of the website.

[4]
Reveal mark scheme Mark scheme for question 3(a)
(b)

One page in the website contains a hyperlink on an image. When the image stored as “ticket.png” is clicked, the user is hyperlinked to the page stored as “booking.htm”.

Write the HTML code to implement this hyperlink.

[3]
Reveal mark scheme Mark scheme for question 3(b)
(c)

The website charges a booking fee of £2.99 on each ticket sold. In addition, if the tickets are purchased from outside of the UK, £4.99 is added to the booking fee. The booking fee is calculated using a JavaScript function named bookingfee().

Complete the definition of the bookingfee() function below.

Figure for question 3
[4]
Reveal mark scheme Mark scheme for question 3(c)
(d)

The JavaScript function above is used to show users the booking fee. When users click to buy the tickets, the booking fee is calculated again on the server.

(d)(i)

Explain why server side processing is used to recalculate the booking fee.

[3]
Reveal mark scheme Mark scheme for question 3(d)(i)
(d)(ii)

Explain one advantage of client side processing to either the customer buying the tickets, or to company who own the website.

[2]
Reveal mark scheme Mark scheme for question 3(d)(ii)
(e)

Users are able to search for and find the ticket website using a search engine. Search engines can use indexing and ranking.

(e)(i)

Describe how a website is indexed by a search engine.

[4]
Reveal mark scheme Mark scheme for question 3(e)(i)
(e)(ii)

A search engine can use the PageRank algorithm to determine a website’s ranking. The PageRank algorithm utilises a damping factor.

State what is meant by the term ‘damping factor’.

[1]
Reveal mark scheme Mark scheme for question 3(e)(ii)
(e)(iii)

Give two other factors that affect the output value given by the PageRank algorithm for a website.

[2]
Reveal mark scheme Mark scheme for question 3(e)(iii)

Computer systems June 2019, Question 11 13 marks

A web development company makes its money building websites for other companies.

(a)

* The web development company is looking to recruit a programmer to build websites.

Discuss the technologies the programmer would need to know and use and the importance of each one.

[9]
Reveal mark scheme Mark scheme for question 11(a)
(b)

Part of a website’s code is shown below.

Figure for question 11

Explain the meaning of the code.

[2]
Reveal mark scheme Mark scheme for question 11(b)
(c)

The site also contains the following code.

<div class="offer">All oranges 50% off.</div>

Complete the CSS code that would make any div elements of the class offer have an orange border.

Figure for question 11
[2]
Reveal mark scheme Mark scheme for question 11(c)

Computer systems June 2018, Question 2 18 marks

A software company decides to build an operating system for OCR smart watches.

(a)

Memory management is one of the functions of an operating system.

(a)(i)

List three functions, other than memory management, of an operating system.

Question 2, shown as an image

2

3

[3]
Reveal mark scheme Mark scheme for question 2(a)(i)
(a)(ii)

Part of a computer’s memory is represented below (Fig. 2). The operating system divides the memory into equally sized chunks.

Figure for question 2

State the name of the type of memory management used in Fig. 2.

Figure for question 2
[1]
Reveal mark scheme Mark scheme for question 2(a)(ii)
(a)(iii)

The operating system needs to load program C into memory but there is not enough space. Describe how the operating system would use virtual memory to load program C.

Figure for question 2
[3]
Reveal mark scheme Mark scheme for question 2(a)(iii)
(b)
Figure for question 2
(b)(i)

Write the HTML to produce the extract from the webpage above. You can assume it will be placed within the <body> tags of a pre-existing page. You do not need to specify the font.

Figure for question 2
[5]
Reveal mark scheme Mark scheme for question 2(b)(i)
(b)(ii)

Explain what happens when a search engine indexes the page. You do not need to discuss ranking.

Figure for question 2
[3]
Reveal mark scheme Mark scheme for question 2(b)(ii)
(b)(iii)

Explain why using a RISC processor rather than a CISC processor is likely to result in increased battery life.

Figure for question 2
[3]
Reveal mark scheme Mark scheme for question 2(b)(iii)

Computer systems June 2017, Question 9 11 marks

Figure for question 9
(a)

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

[2]
Reveal mark scheme Mark scheme for question 9(a)
(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]
Reveal mark scheme Mark scheme for question 9(b)
(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.

(c)(i)

State the name of the language used between the script tags.

[1]
Reveal mark scheme Mark scheme for question 9(c)(i)
(c)(ii)

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.

Explain how this bug can be fixed.

[1]
Reveal mark scheme Mark scheme for question 9(c)(ii)
(c)(iii)

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

[1]
Reveal mark scheme Mark scheme for question 9(c)(iii)

Report a problem with a question on this page
What is wrong?

Goes to whoever maintains the question split. No account needed and nothing is published on this page.

Memes

Certified Computer Science memes. Peer-reviewed by nobody.

Laugh now. Cry in the exam hall later. Then come back and do a past paper.

Write a proper algorithm
Write ‘sort it’ and leave
Me on the 6-mark pseudocode question
Debugging with print statements
Using a trace table
Knowing the difference between = and ==
Explaining recursion by explaining recursion
Code enlightenment, ranked

Mum 💖

can you fix the wifi since you do computers 🥰

that's not what computer science is

so that's a no then

📱 Screen time this week · Discord8h 2m

Turned it off and on again

Computer Science starter pack

Laptop with 47 tabs openPython error on line 1Counting binary on fingersThis website
Compiled with zero errors