250+ TOP MCQs on CSS1 and CSS 2.1 Properties and Answers

CSS test on “CSS1 and CSS 2.1 Properties”.

1. Which of the following property sets in a shorthand form any or all background properties?
a) font
b) background
c) background-color
d) background-position

Answer: b
Clarification: Syntax:

background: background-color background-image background-repeat background-attachment background- position;

2. Which of the following property defines whether table cell borders are connected or separate?
a) border-style
b) border-collapse
c) border-color
d) border-bottom-width

Answer: b
Clarification:

Syntax: border-collapse: collapse | separate | inherit

3. Which of the following property defines the style for the right border of an element?
a) border-left
b) border-right
c) border-right-style
d) border-style

Answer: c
Clarification:

Syntax:border-right-style: dashed | dotted | double | groove | hidden | inset | inherit | none | outset | ridge | solid

4. Which of the following property defines the visual style of up to four different sides of a border?
a) border-width
b) border-top
c) border
d) border-style

Answer: d
Clarification:

Syntax: border-style: style [ style style style ]

5. Which of the following property sets the coordinates of the clipping shape that exposes or hides the content of absolutely positioned elements?
a) clip
b) clamp
c) clip-wekit
d) clamp-webkit

Answer: b
Clarification:

Syntax: clip: rect(coordinates) | auto | inherit

6. Which of the following property generates content in a document and is used with the :before and :after pseudo-elements?
a) text
b) content
c) contents
d) none of the mentioned

Answer: c
Clarification:

Syntax: content: normal | none | string

7. Which of the following property controls CSS counter values?
a) counter
b) counter-increment
c) counter-decrement
d) none of the mentioned

Answer: b
Clarification:

Syntax: counter-increment: counter-name1 [integer] ... counter-nameN [integer] | none | inherit

8. Which of the following property determines how the cursor displays when passed over the affected element?
a) mouse
b) cursor
c) click
d) focus

  250+ TOP MCQs on Generated Content and Answers

Answer: d
Clarification:

Syntax: cursor: url(address of cursor file)

9. Which of the following property is used to control the text direction, much like the dir attribute for (X)HTML tags?
a) left
b) right
c) direction
d) direct

Answer: c
Clarification:

Syntax: direction: ltr | rtl | inherit

10. Which of the following property specifies an element’s display type and can override an element’s defined presentation?
a) content
b) display
c) visibility
d) none of the mentioned

Answer: d
Clarification:

Syntax: display: inline | block | list-item

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top