CSS Multiple Choice Questions & Answers (MCQs) focuses on “Server Specific CSS”.
Q 1. Which of the following will select all elements within the class?
A. .class
B. #id
C. element
D. element>element
Show Answer
Answer:-A. .classExplanation
class selects all elements within the given class, #id selects the element within the given id, element>element selects allelements where parent is
elements.
Q 2. Which of the following selects all <div> elements and all <p> elements?
A. element,element
B. element+element
C. element,element
D. element element
Show Answer
Answer:-C. element,elementExplanation
element,element selects allelements, element element selects all
elements inside
elements where parent is a
elements that are placed immediately after
Q 3. Which of the following selects all elements with a target attribute?
A. attribute
B. attribute=value
C. attribute~=value
D. attribute^=value
Show Answer
Answer:-A. attributeExplanation
attribute selects all elements with a target attribute, attribute=value selects all elements for the given target, attribute~=value selects all elements with a title attribute containing the given title, attribute=value selects all elements with a lang attribute value starting with the given lang.Q 4. Which of the following selects every <a> element whose href attribute value contains the given substring?
A. attribute*=value
B. attribute$=value
C. attribute^=value
D. attribute|=value
Show Answer
Answer:-A. attribute*=valueExplanation
attribute*=value selects every element whose href attribute value contains the given substring, attribute$=value selects every element whose href attribute value ends with the given href, attribute^=value selects every element element whose href attribute value begins with “https”.Q 5. Which of the following selects every <p> element that has no children?
A. empty
B. enabled
C. checked
D. disabled
Show Answer
Answer:-A. emptyExplanation
:empty selects everyelement that has no children including text nodes, :checked selects every checked element, :disabled selects every disabled element, :enabled selects every enabled element.
Q 6. Which of the following selects input element which has focus?
A. in-range
B. focus
C. hover
D. invalid
Show Answer
Answer:-B. focusExplanation
focus selects input element which has focus, :hover selects links on mouse hover, :in-range selects input elements with a value within a specified range, :invalid selects all input elements with an invalid value.Q 7. Which selects all unvisited links?
A. link
B. not(selector)
C. last-child
D. nth-child(n)
Show Answer
Answer:-A. linkExplanation
:link selects all unvisited links, :not(selector) selects every element that is the second child of its parent, :last-child selects everyelement that is the last child of its parent.
Q 8. Which of the following will select every <p> element that is the only child of its parent?
A. only-child
B. only-of-type
C. optional
D. out-of-range
Show Answer
Answer:-A. only-childExplanation
:only-child selects everyelement that is the only child of its parent, :only-of-type selects every
element that is the only child of its parent, :optional selects input elements with no “required” attribute.
Q 9. Which selects document’s root element?
A. required
B. root
C. selection
D. out-of-range
Show Answer
Answer:-B. rootExplanation
root selects the document’s root element, ::selection selects the portion of an element that is selected by a user, :required selects input elements with “required” attribute specified, :out-of-range selects input elements with a value outside a specified range.Q 10. Which selects all visited links?
A. valid
B. visited
C. target
D. selection
Show Answer
Answer:-B. visitedExplanation
visited selects all visited links, :valid selects all input elements with a valid value, :target selects the current active # element, ::selection selects the portion of an element that is selected by a user.Q 11. background-blend-mode is not supported by?
A. IE
B. Opera
C. Chrome
D. Firefox
Show Answer
Answer:-A. IEExplanation
background-blend-mode is not supported by Internet Explorer, background-clip, background-color, background-image, background-origin, background-position, background, background-repeat, background-size are supported by all the browsers.Q 12. @font-feature-values are only supported in _______________
A. chrome
B. IE
C. Firefox
D. Opera
Show Answer
Answer:-C. FirefoxExplanation
@font-feature-values are supported by Firefox only, font-kerning is supported by all the browsers, font-language-override is supported by firefox only, font-varient is supported by all the browsers.Q 13. A grid is not supported by _______________
A. Chrome
B. IE
C. Opera
D. Firefox
Show Answer
Answer:-B. IEExplanation
Grid is not supported by Internet Explorer, grid-area, grid-auto-column, grid-column, grid-column-start, grid-column-end, grid-auto-row, grid-row-gap, grid-row-start is supported by all the browsers.Q 14. outline-offset is not supported by _______________
A. IE
B. Chrome
C. Opera
D. Firefox
Show Answer
Answer:-A. IEExplanation
outline-offset is not supported by Internet Explorer, outline, outline-color, outline-style, outline-width are supported by all the browsers.Q ’15. @page is not supported by _________________
A. chrome
B. opera
C. IE
D. Firefox
Show Answer
Answer:-A. chromeExplanation
@page is not supported by chrome, page-break-after, page-break-before, page-break-inside, perspective, perspective-origin, pointer-events, position are all supported by all the browsers.by
Tags:
Comments
You cannot copy content of this page
Leave a Reply