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.

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

Yes
Sorta
No
None of the above

2.

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

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

3.

What is the proper format of an CSS comment?

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

4.

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

Yes
None of the above
No
Maybe

5.

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

None of the above
Maybe
Yes
No

6.

 What are floating elements?

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

7.

Which of the following does CSS not do?

design
content
layout
style

8.

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

ids
selectors
attribute selectors
pseudo-classes

9.

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

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

10.

 Which of the following statements is not correct?

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

11.

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

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

12.

 Which of the following is not correct CSS syntax?

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

13.

What is the difference between margins and padding?

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

14.

Which of the following is not a valid color code?

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

15.

What is the proper syntax for changing the cursor style?

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

16.

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

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

17.

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

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

18.

 How would you set a background image with CSS?

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

19.

Internal CSS Is:

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