Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1<button onclick="alert('Hi!')">Click me</button> | Aif (clicked) { console.log('Hello'); } | |
| 2<script src="app.js"></script> | Bbutton.addEventListener('click', sayHi); | |
| 3JavaScript is a programming language, so it can make decisions and respond to the user | CHTML and CSS are markup languages for structure and presentation, not programming languages | |
| 4Presentation changes how a page looks, but behaviour changes what the page does when the user acts | DLoads a JavaScript file that adds behaviour to the page | |
| 5<style> button.onclick = sayHi; </style> | EJavaScript behaviour was put inside a style element, which only holds CSS presentation rules | |
| 6HTML and CSS are programming languages that make pages respond to clicks | FA button whose behaviour runs JavaScript when the user clicks it |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
JavaScript — The programming language that adds behaviour to a web page, such as reacting to a click, on top of its HTML content and structure and its CSS presentation.<button onclick="sayHi()">Click me</button><script src="app.js"></script>function sayHi() {
alert("Hi!");
}button.addEventListener("click", sayHi);let title = document.getElementById("h");
title.textContent = "Clicked!";