Positioning of Elements MCQ
This section focuses on "Positioning of Elements" in Cascading Style Sheets (CSS). These Multiple Choice Questions (mcq) should be practiced to improve the Cascading Style Sheets (CSS) skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.
1. How many types of position values are there in CSS?
A. 2
B. 3
C. 4
D. 5
View Answer
Ans : C
Explanation: There are four types of position values: static, relative, absolute, fixed.
2. The default for any page element is?
A. Fixed
B. relative
C. absolute
D. Static
View Answer
Ans : D
Explanation: The default for any page element is static
3. Positioning attributes top, bottom, left and right are used to determine the exact location
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: Positioning attributes top, bottom, left and right are used to determine the exact location
4. Which of the following CSS Property controls how an element is positioned?
A. position
B. set
C. static
D. fix
View Answer
Ans : A
Explanation: Controls how an element is positioned. When set to absolute or fixed, the element is removed completely from the normal flow of the document. When set to relative, the element is moved relative to its position in the normal flow, but a space is left where it would normally have been. The default value, static, means the element remains in the normal flow and is not positioned.
5. Reverse CSS Property specifies the top offset of a positioned element.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : B
Explanation: Top CSS Property specifies the top offset of a positioned element.
6. Which of the following CSS Property sets the stacking order of positioned elements?
A. x-index
B. y-index
C. z-index
D. All of the above
View Answer
Ans : C
Explanation: z-index CSS Property sets the stacking order of positioned elements.
7. In Absolute position, If there is no parent element, these elements are set to be _______ to the page.
A. absolute
B. static
C. fixed
D. relative
View Answer
Ans : D
Explanation: If there is no parent element, these elements are set to be relative to the page itself
8. Which of the following CSS Property specifies the x-coordinate in the position of the mask?
A. mask-x
B. mask-x-origin
C. mask-position-x
D. mask-origin-x
View Answer
Ans : C
Explanation: mask-position-x: length | percentage | left | center | right
9. Setting the position to relative makes the element appear on bottom of any other static element in its area.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : B
Explanation: Setting the position to relative makes the element appear on top of any other static element in its area.
10. Which of the following CSS Property defines the x-coordinate of the background-position property?
A. background-position-x
B. background-position-y
C. background-x-axis
D. background-y-axis
View Answer
Ans : A
Explanation: Syntax: background-position-x: length | percentage | left | center | right
Discussion