CSS Questions & Answers – Server Specific CSS

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. .class
Explanation 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.

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

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. attribute
Explanation 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*=value
Explanation 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. empty
Explanation :empty selects every

element 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. focus
Explanation 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. link
Explanation :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.

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-child
Explanation :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.

Q 9. Which selects document’s root element?
A. required
B. root
C. selection
D. out-of-range

Show Answer Answer:-B. root
Explanation 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. visited
Explanation 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. IE
Explanation 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. Firefox
Explanation @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. IE
Explanation 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. IE
Explanation 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. chrome
Explanation @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.

Comments

Leave a Reply

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

You cannot copy content of this page