Font size
WorksheetsQUIZ 1 - HTML & Javascript
Total questions: 30
Worksheet time: 22mins
Which is used to create a submission button?
<button type="submit">Submit Here</button>
There is no way to make a submission button.
<input type="submit">
<input type="text" name="UserName"/>
Which modified tag should you use if you want the text box to appear with default text that reads "Enter Name Here"?
The <th> tag marks what in a data table?
column cell
row
heading cell
table title
Pieces of a web page; basic features that most Web pages have in common (such as paragraphs, headings, images, and lists) are called:
Elements
Tags
Characteristics
Designs
b?var a = true;
var b = a || false;alert(“5 + 6”);
The code above will result in which output:
syntax error
11
10
5 + 6
The code below would result in which answer?
var x = 1;
var y = 2;
vary z = 3;
z = x + y;
x = z + x;
alert(z);
3
4
5
syntax error
for (var i = 0; i < 10; i++){
text("A", 40, i+40);
}
How many "A"s would be printed on screen?
0
9
10
11
Which is a correct example of a JavaScript function?
function run()
{
alert("Here is a message")
}
run()
{
alert("Here is a message")
}
run function()
{
alert("Here is a message")
}
run() function
{
alert("Here is a message")
}
What does the following represent?
var colors = ['red', 'white', 'blue'];
a string
an array
a function
an object
What will the alert say?
myNum = 0;
function getThis() {
var myNum = 15;
return;
}
getThis();
alert("This is my number " + myNum);
This is my number 0
This is my number 15
This is my number
This is my number undefined
If today was Wednesday, what would the output of the following be?
switch (new Date().getDay()) {
case 4:
case 5:
text = "Soon it is the Weekend";
break;
case 0:
case 6:
text = "It is the Weekend";
break;
default:
text = "Looking forward to the Weekend";
}
Looking forward to the Weekend
Soon it is the Weekend
It is the Weekend
Nothing will output
