CSS Quiz

Return to Programming Language Quiz List

1. What does CSS stand for?

A. Creative Style Sheets

B. Colorful Style Sheets

C. Cascading Style Sheets

D. Computer Style Sheets

View Answer
C. Cascading Style Sheets

2. In CSS, h1 can be called as?

A. Selector

B. Value

C.Attribute

D. Tag

View Answer
A. Selector

3. Which HTML tag is used to define an internal style sheet?

A. css

B. text/style

C. style

D. script

View Answer
C. style

4. ____ has introduced text, list, box, margin, border, color, and background properties.

A. css

B. html

C. ajax

D. php

View Answer
A. css

5. CSS padding property is used for?

A. Border

B. Space

C. Margin

D. Background color

View Answer
B. Space

6. Which is the correct CSS syntax?

A. body {color: black}

B. {body;color:black}

C. {body:color=black(body}

D. body:color=black

View Answer
A. body {color: black}

7. To define the space between the element’s border and content, you use the padding property, but are you allowed to use negative values?

A. Yes

B. No

View Answer
B. No

8. What are the three methods for using style sheets with a web page

A. Dreamweaver, GoLive or FrontPage

B. Handcoded, Generated or WYSIWYG

C. Inline, embedded or document level and external

D. text-decoration

View Answer
C. Inline, embedded or document level and external

9. In CSS, “font-size” can be called as?

A. Selector

B. Rule

C. Property

D. Property-Name

View Answer
D. Property-Name

10. How do you insert a comment in a CSS file?

A. // this is a comment

B. // this is a comment //

C. ‘ this is a comment

D. /* this is a comment */

View Answer
D. /* this is a comment */

11. How do you change the left margin of an element?

A. left-margin:

B. margin-left:

C. margin:

D. text-indent:

View Answer
B. margin-left:

12. Which CSS property controls the text size?

A. font-size

B. font-style

C. text-style

D. text-size

View Answer
A. font-size

13. ____ selectors are used to specify a group of elements.

A. id

B. class

C. tag

D. both class and tag

View Answer
B. class

14. How do you change the font of an element?

A. font-family:

B. f:

C. font=

D : font-style:

View Answer
A. font-family:

15. How do you make each word in a text start with a capital letter?

A. text-transform:capitalize

B. text-transform:uppercase

C. text-transform:cptl

D. You can’t do that with CSS

View Answer
A. text-transform:capitalize

16. How do you display hyperlinks without an underline?

A. a {decoration:no underline}

B. a {underline:none}

C. a {text-decoration:none}

D. a {text-decoration:no underline}

View Answer
C. a {text-decoration:none}

17. What is the correct CSS syntax for making all the elements bold?

A. p{font:bold}

B. p {text-size:bold}

C. style:bold

D. p {font-weight:bold}

View Answer
D. p {font-weight:bold}

18. How do you add a background color for all ” <h1> ” elements?

A. h1.all {bg-color:#FFFFFF}

B. all.h1 {background-color:#FFFFFF}

C. h1 {background-color:#FFFFFF}

D. h1.all {background-color:#FFFFFF}

View Answer
C. h1 {background-color:#FFFFFF}

19. What is the CSS Property Equivalent for the attribute?

A. text-decoration:reappear

B. text-decoration:no-text

C. text-decoration:blink

D. none

View Answer
B. text-decoration:no-text

20. In CSS, “em”, “%” and “pt” are

A. Relative measure units

B. Absolut measure units

C. Measure units, but “%” is relative and “em” and “pt” are absolute

D. Measure units, but “em” and “%” are relative, and “pt” is absolute

View Answer
D. Measure units, but “em” and “%” are relative, and “pt” is absolute