Where does the <title> tag belong and what does it do?
Nested in the <head> tag to display the web title in the browser tab
To select the class of an HTML element the selector in CSS will have to start with a ________
(.) period
What symbol would you use to call jQuery?
($) Dollar Sign
Declare a variable named variableName.
let variableName;
What is the name of this array:
let addToJeopardyScore = [];
addToJeopardyScore
Give an example of an HTML attribute.
src, href, ...
Give an example of a CSS property.
width, color, font-size, opacity, border,...
Using jQuery, how would you select all elements with the class of "danger" on the webpage?
$(".danger")
How would you access the 2nd element of an array with the name myArray?
myArray[1]
What is the data type of: 132?
Number
Name an HTML tag that does not need a closing tag.
<img>, <input>...
Fill in the blanks.
In the following CSS rule, "img" is a __________, "width" is a __________, and "100px" is a __________.
img { width: 100px; }
(1) selector (2) property (3) value
Write the jQuery that would grab the value of an input from the element with a class of userInput.
$(".userInput").val();
Write the operators and their symbols you use to do addition, subtraction, multiplication, and division in JavaScript
Addition (+) Subtraction(-) Multiplication (*) Division (/)
How would you find the number of items in an array called "teacherNames"?
teacherNames.length;
Which is the correct HTML for inserting an image?
1. <img href="image.gif">
2. <image src="image.gif">
3. <img>image.gif</img>
4. <img src="image.gif">
4. <img src="image.gif">
Given the following HTML, write a CSS rule that targets ONLY the second image and sets its width property to 200px.
<img class="largeImages" src="pic1.jpg">
<img class="largeImages" class="second" src="pic2.jpg">
<img class="third" src="pic3.jpg">
.second { width: 200px; }
Rewrite this code to correct the errors:
$("button").function(click){
$("p").css("blue","color");
});
$("button").click(function(){
$("p").css("color","blue");
});
Write an array called winner that contains a number and a string.
let winner = [1, "a string"];
Using a loop log each element in the array to the console.
let fruits=["apple","pear","orange"];
let fruits=["apple","pear","orange"];
for(let fruit of fruits){
console.log(fruit);
}
Which of the following elements will create a hyperlink on a webpage that when clicked will take the user to google.com?
1. <a href="http://www.google.com">Google</a>
2. <a src="http://www.google.com">Google</a>
3. <a name="Google">http://www.google.com</a>
4. <link href="http://www.google.com">Google</link>
5. <link src="http://www.google.com">Google</link>
6. <link name="Google">http://www.google.com</link>
1. <a href="http://www.google.com">Google</a>
What's wrong with the following CSS rule? (hint: there are at least 3 errors)
p ( color - blue )
1.Uses parentheses instead of curly-braces.
2. Uses "-" instead of ":" between color and blue.
3. No semi-colon after blue.
Write it:
When a button with the class of clickMe is pressed, an image with the source "pup.png" should be appended to all elements with the class of "priority".
$(".clickMe").click(function(){
$(".priority").append(`<img src='pup.png'>`);
});
Write a conditional statement that returns "yes" if x is greater than 100, and "no" if it isn't.
if (x>100) {
return "yes";
} else {
return "no";
}
let cost = [];
$("button").click(function() {
let input = $("input").val();
cost.push(input);
});
Given the code above, what will happen when the user clicks the button?
The text in the input box will be saved and the value will be pushed into the array called "cost"