250+ TOP MCQs on Server Specific CSS and Answers

CSS Multiple Choice Questions on “Server Specific CSS”.

1. Which of the following will select all elements within the class?
a) .class
b) #id
c) element
d) element>element

Answer: a
Clarification: .class selects all elements within the given class, #id selects the element within the given id, element>element selects all

elements where parent is

element, element selects all

elements.

2. Which of the following selects all

elements and all

elements?
a) element,element
b) element+element
c) element,element
d) element element

Answer: c
Clarification: element,element selects all

elements and all

elements, element element selects all

elements inside

elements, element>element selects all

elements where parent is a

element, element+element selects all

elements that are placed immediately after

element.

3. Which of the following selects all elements with a target attribute?
a) attribute
b) attribute=value
c) attribute~=value
d) attribute^=value

Answer: a
Clarification: 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.

4. Which of the following selects every element whose href attribute value contains the given substring?
a) attribute$=value
b) attribute*=value
c) attribute^=value
d) attribute|=value

Answer: b
Clarification: 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”.

5. Which of the following selects every

element that has no children?
a) :empty
b) :enabled
c) :checked
d) :disabled

  250+ TOP MCQs on The Specification of CSS and Answers

Answer: a

6. Which of the following selects input element which has focus?
a) :in-range
b) :hover
c) :focus
d) :invalid

Answer: c
Clarification: :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.

7. Which selects all unvisited links?
a) :last-child
b) :not(selector)
c) :link
d) :nth-child(n)

Answer: c
Clarification: :link selects all unvisited links, :not(selector) selects every element that is the second child of its parent, :last-child selects every

element that is the last child of its parent.

8. Which of the following will select every

element that is the only child of its parent?
a) :only-child
b) :only-of-type
c) :optional
d) :out-of-range

Answer: a
Clarification: :only-child selects every

element 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.

9. Which selects document’s root element?
a) :required
b) :root
c) ::selection
d) :out-of-range

Answer: b
Clarification: :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.

10. Which selects all visited links?
a) :valid
b) :visited
c) :target
d) :selection

Answer: b
Clarification: :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.

  250+ TOP MCQs on Using Advanced Selectors and Answers

11. background-blend-mode is not supported by?
a) IE
b) Opera
c) Chrome
d) Firefox

Answer: a
Clarification: 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.

12. @font-feature-values are only supported in _______________
a) chrome
b) firefox
c) IE
d) Opera

Answer: b
Clarification: @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.

13. A grid is not supported by _______________
a) IE
b) Chrome
c) Opera
d) Firefox

Answer: a
Clarification: 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.

14. outline-offset is not supported by _______________
a) IE
b) Chrome
c) Opera
d) Firefox

Answer: a
Clarification: outline-offset is not supported by Internet Explorer, outline, outline-color, outline-style, outline-width are supported by all the browsers.

15. @page is not supported by _________________
a) chrome
b) opera
c) IE
d) Firefox

Answer: a
Clarification: @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.

Leave a Comment

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

Scroll to Top