CSS Questions & Answers – CSS1 and CSS 2.1 Properties

CSS Multiple Choice Questions & Answers (MCQs) focuses on “CSS1 and CSS 2.1 Properties”.

Q 1. Which of the following property sets in a shorthand form any or all background properties?
A. font
B. background-color
C. background
D. background-position

Show Answer Answer:-C. background
Explanation Syntax: background: background-color background-image background-repeat background-attachment background- position;

Q 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

Show Answer Answer:-B. border-collapse
Explanation Syntax: border-collapse: collapse | separate | inherit

Q .3. Which of the following property defines the style for the right border of an element?
A. border-left
B. border-right-style
C. border-right
D. border-style

Show Answer Answer:-B. border-right-style
Explanation Syntax:border-right-style: dashed | dotted | double | groove | hidden | inset | inherit | none | outset | ridge | solid

Q 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

Show Answer Answer:-D. border-style
Explanation Syntax: border-style: style [ style style style ]

Q 5. Which of the following property sets the coordinates of the clipping shape that exposes or hides the content of absolutely positioned elements?
A. clamp
B. clip
C. clip-wekit
D. clamp-webkit

Show Answer Answer:-A. clamp
Explanation Syntax: clip: rect(coordinates) | auto | inherit

Q 6. Which of the following property generates content in a document and is used with the :before and :after pseudo-elements?
A. text
B. contents
C. content
D. none of the mentioned

Show Answer Answer:-B. contents
Explanation Syntax: content: normal | none | string

Q 7. Which of the following property controls CSS counter values?
A. counter
B. counter-increment
C. counter-decrement
D. none of the mentioned

Show Answer Answer:-B. counter-increment
Explanation Syntax: counter-increment: counter-name1 [integer] … counter-nameN [integer] | none | inherit

Q 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

Show Answer Answer:-D. focus
Explanation Syntax: cursor: url(address of cursor file)

Q 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

Show Answer Answer:-C. direction
Explanation Syntax: direction: ltr | rtl | inherit

Q 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

Show Answer Answer:-D. none of the mentioned
Explanation Syntax: display: inline | block | list-item

Comments

Leave a Reply

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

You cannot copy content of this page