NEW
Font size
S
M
L
XL
WorksheetsIntro to HTML, CSS, JS
Total questions: 10
Worksheet time: 8mins
Name
Class
Date
1.
Which is the correct CSS syntax for changing the color of a text?
a)
{body=text-color:white}
b)
body{color:white;}
c)
body:color={white};
d)
body:color=white;
2.
What does the following mean to the computer? div p {color: #ff0000;}
a)
Make text in all divs and all paragraphs in this document be red
b)
Make the background in all divs that are of the class "p" be red
c)
Make the text inside any paragraph that is inside any div be red
d)
Make the text inside any divs inside of any paragraph be red
3.
How can you open a link in a new tab?
a)
<a href="url" target="new">
b)
<a href="url" target="_blank">
c)
<a href="url" new>
d)
<a href="url" blank>
4.
How can you group selectors?
a)
Separate each selector with a plus sign
b)
Separate each selector with a comma
c)
Separate each selector with a space
d)
Separate each selector with a dot
5.
How do you display a top-border=10, bottom-border=5px, left-border=20px, right-border=1px, using shorthand
a)
border-width: 10px 5px 20px 1px
b)
border-width: 5px 1px 10px 20px
c)
border-width: 20px 10px 5px 1px
d)
border-width: 10px 1px 5px 20px
6.
I want to hide an element while still taking up space. Which CSS rule should I use?
a)
display: none;
b)
top: -9999px;
c)
z-index: -1;
d)
visibility: hidden;
7.
Which of the following statements will throw an error
a)
var fun = function bar( ){ }
b)
var fun = function bar{ }function fun( ){ }
c)
function fun( ){ }
d)
function( ){ }
8.
Given x = new Date(), how do you represent x as a String in universal time (time zone +0000)?
a)
x.getUTC();
b)
x.getUTCDate();
c)
x.toUTCString();
d)
x.getUTCString();
9.
What is the value of x ? var a = false; var x = a ? "A" : "B";
a)
Undefined
b)
true
c)
"A"
d)
"B"
10.
Which of the following is the equivalent: if (a) { x = b; } else { x = c; }
a)
X = a : b ? c
b)
X = a ? b : c
c)
X = a ? b , c
d)
X = a ? b || c
Reset
