How do you declare a variable in JavaScript?
var name = "John";
let age = 30;
const pi = 3.14;
What is the output of the following code:
if (3 > 1) console.log("A"); else console.log("B");
A
What is the property that changes text color?
color
What tag is used for paragraph elements?
<p>Hello, World!</p>
This CSS property can make text uppercase without changing the HTML
text-transform: uppercase;
Can you change a const variable?
Nuh uh
What keyword runs code only when a condition is false?
else
What property changes font size?
font-size
How many header tags are there?
6: The highest value (e.g; <h6>) is the smallest and lightest.
This hides an element but still keeps its layout space
visibility: hidden
Difference between let and var?
Variables declared with var can be redeclared, whilst ones declared with let can not
How many else if blocks can you chain?
Yes!!!
How do you apply CSS properties to specific HTML elements?
-- code
}
This tag defines the page title shown in the browser tab
<title>
What does HTML stand for?
HyperText Markup Language
How do you declare a variable equal to a specific document element ID?
var x = document.getElementById("elementID");
What gets printed from the following code?
let x = 10;
if (x < 5) console.log("low");
else if (x < 15) console.log("mid");
else console.log("high");
mid
How do you reference a specific ID in CSS?
#ID { -- code }
This tag creates the largest heading
<h1>
When was HTML invented?
1989
Can functions be declared as variables?
Yes!
const add = (a, b) => a + b;
console.log(add(5, 3)); // Output: 8
What boolean value does 0, "", null, and undefined evaluate to in conditions?
false
What does CSS stand for?
Cascading Style Sheets
How do you create a form in HTML?
<form action="/submit" method="POST">
<!-- Text input -->
<label for="name">Full Name:</label>
<br>
<input type="text" id="name" name="name" required>
<br>
</form>
Who invented HTML?
Tim Berners-Lee