Quizes & Games

CSS Quiz

The test contains 20 questions and it's not official, it's just a nice way to see how much you know, or don't know, about CSS.

1.

 What does "margin-left: auto; margin-right: 0px;" do?

horizontally aligns an element to the center of the page
vertically aligns an element to the top of the page
horizontally aligns an element to the right of the page
vertically aligns an element to the bottom of the page

2.

 Which of the following statements is not correct?

ids are identified with a number sign (#)
classes are identified with a dot (.)
classes and ids are not used in inline CSS
classes are identified a number sign (#)

3.

 Is it possible to make the first character of an element look different than the other characters?

Yes
None of the above
No
Maybe

4.

 From the inside out, which of the following portrays the correct order of a  box model?

border, margin, content, padding
content, padding, border, margin
content, margin, border, padding
margin, border, padding, content

5.

Which of the following is not a valid color code?

#505050
grey
808080
rgb(80, 80, 80)

6.

Internal CSS Is:

Added Directly to An HTML Tag
Internal ascept of CSS
Maintained In A Separate File
Added to An HTML Document's Header

7.

What is the proper format of an CSS comment?

<! !>
//
<!-- -->
/* */

8.

Which of the following does CSS not do?

content
design
layout
style

9.

"a:hover" and "a:active" are both examples of what?

pseudo-classes
selectors
ids
attribute selectors

10.

 Which of the following examples will set multiple font properties for an entire webpage?

body { font: ; }
body { font-size: ; }
p { font-size: ; }
style="font: ;"

11.

 How would you set a background image with CSS?

background-attachment: url();
background-image: src();
background: #FFF url();
background-url: ;

12.

What is the proper syntax for changing the cursor style?

cursor: value;
cursor { type: value; }
mouse-pointer { type: value; }
mouse-pointer: value;

13.

 Can CSS classes and ids both be used (referenced) more than once on the same webpage?

None of the above
No
Sorta
Yes

14.

 Which of the following is not correct CSS syntax?

p { border: 1px dotted #000000; }
<p style="border: 1px dotted #000000;"> </p>
p, h1, h2 { color: green; }
p { border= 1px dotted #000000; }

15.

 What does "text-transform: capitalize;" do?

Does it do this?
Does it do this?
Does it do this?
Does it do this?

16.

Which of the following examples will position a layered element toward the top of the stack?

position: static;
top: 100px;
top: -100px
top: 100px;

17.

Can images replace the numbers/bullets in both ordered and unordered lists?

No
None of the above
Maybe
Yes

18.

What is the difference between margins and padding?

padding adds whitespace inside the border and margins add whitespace outside
there is no difference
margins add whitespace inside the border and padding adds whitespace outside
padding adds whitespace and margins increase the border size

19.

 What are floating elements?

elements that are pushed to the right or the left of a page
clouds
elements that are pushed to the top or the bottom of a page
clear: left;