21
The CSS property used to represent the overflowed text which is not visible to the user is .
A.
B.
C.
D.
Answer & Solution
The
text-overflow property in CSS is used to control how text is
handled when it overflows the containing box. Common values are ellipsis (which shows "..." when text
overflows) and clip. Example: element { text-overflow: ellipsis; }.
22
The CSS property used to set the minimum width of the element's content box is .
A.
B.
C.
D.
Answer & Solution
The min-width property in CSS sets the minimum width that an element can have. This prevents the element from becoming smaller than the specified width, even if the content inside is smaller. Example: element { min-width: 300px; }.
23
The CSS property used to set the maximum height of the element's content box is .
A.
B.
C.
D.
Answer & Solution
The
max-height property in CSS is used to set the maximum
height of an element, ensuring that the element does not exceed this height
even if the content inside is larger. Example: element { max-height: 200px; }.
24
Which of the following inbuilt CSS function allows us to perform calculations?
A.
B.
C.
D.
Answer & Solution
The
calc()
function in CSS allows you to perform calculations directly within the CSS
properties. This is useful for creating responsive layouts or when you need to
dynamically calculate values based on other properties. Example: element { width: calc(100% - 20px); }.
25
The CSS property used to set the maximum width of the element's content box is .
A.
B.
C.
D.
Answer & Solution
The
max-width property in CSS is used to set the maximum
width of an element. This ensures that the element does not grow larger than
the specified value, even if the content inside it exceeds that width. Example:
element { max-width: 500px; }.
26
The CSS property specifies the origin of the background image .
A.
B.
C.
D.
Answer & Solution
The
background-origin property specifies where the background image
should be positioned relative to the element. Possible values include border-box, padding-box, and content-box. Example: element { background-origin: border-box; }.
27
Which type of CSS is used in the below code?
<p style = "border:10px solid blue;">
A.
B.
C.
D.
Answer & Solution
The
style
attribute within the <p> tag applies inline CSS directly to that
specific element. This is referred to as inline CSS, where styles are defined
within the HTML element itself rather than in an external or internal
stylesheet.
28
The CSS property defines the way- an image or video fits into container with established height and width is .
A.
B.
C.
D.
Answer & Solution
The
object-fit property is used in CSS to control how the
content of a replaced element (like an image or video) should fit within its
container. Common values include cover, contain, and fill. Example: element { object-fit: cover; }.
29
Which of the following is not a type of combinator?
A.
B.
C.
D.
Answer & Solution
The asterisk (*) is not a combinator in CSS; it is the universal selector,
used to select all elements. The valid combinators are:
- > (child
combinator)
- ~ (general sibling combinator)
- + (adjacent sibling combinator)
30
The selector in CSS used to select the elements that do not match the selectors is .
A.
B.
C.
D.
Answer & Solution
The
:not
pseudo-class in CSS selects elements that do not match a given selector. It is
useful for excluding specific elements from being styled. Example: div:not(.class-name) { color: red; }.
