MCQGeeks
CBSE
JEE
NTSE
NEET
English
UK Quiz
Quiz
Driving Test
Practice
Games
Quiz
CSS
CSS Selectors And CSS Files
Quiz 1
Solution
Q.1.
Which of the following selectors selects the specified elements of type E with a particular class value?
E.class
E ~ F
*
E, F, G
Q.2.
Which of the following selectors selects adjacent siblings?
E > F
E F
E + F
E ~ F
Q.3.
What will happen in this case?
p strong {background-color: yellow;}
Strong have yellow background
Strong element within a p element have a yellow background
Both p and strong have yellow background
None of the mentioned
Q.4.
A similar rule called the ____________ is specified using the plus sign (+) and is used to select elements that would be siblings of each other.
class selectors
attribute selectors
adjacent-sibling selector
none of the mentioned
Q.5.
Which of the following selectors selects any tag with an id attribute set?
E#id
.class
#id
*
Q.6.
Which of the following selectors selects direct descendents?
E > F
E F
E + F
E ~ F
Q.7.
Which of the following selectors selects siblings?
E.class
E ~ F
*
E, F, G
Q.8.
Which of the following selector selects the element that is the target of a referring URI?
:target
:selection
::selection
:URI
Q.9.
Which of the following selector applies styles to elements that are valid per HTML5 validations set either with the pattern or type attributes?
:valid
:required
:optional
:invalid
Q.10.
p {line-height: 150%;}.What type of selector is used in this case?
class Selectors
element Selectors
id Selectors
none of the mentioned
Q.11.
By applying an ___________ a style can be applied to just a single tag.
class rule
element rule
id rule
none of the mentioned
Q.12.
The _____________ attribute is used to define the name(s) of the class(es) to which a particular tag belongs.
class
element
id
none of the mentioned
Q.13.
A ___________ is used to define a special state of an element.
pseudo-tag
pseudo-element
pseudo-id
pseudo-class
Q.14.
The __________ property specifies the type of positioning method used for an element.
align
float
position
padding
Q.15.
Which of the following selector selects an element that has no children?
:empty
:nochild
:inheritance
:no-child
Q.16.
Which of the following selector selects the elements that are currently enabled?
:element
:empty
:enabled
none of the mentioned
Q.17.
Which of the following selector selects the element that is the first child of its parent that is of its type?
:first-of-type
:last-child
::first-line
::first-letter
Q.18.
Which of the following selector selects all elements of E that have the attribute attr that end with the given value?
E[attr^=value]
E[attr$=value]
E[attr*=value]
none of the mentioned
Q.19.
Which of the following selector selects the elements that are checked?
E ~ F
::after
:checked
none of the mentioned
Q.20.
Which of the following selector selects the elements that are the default among a set of similar elements?
:default
:%
:disabled
none of the mentioned
Support mcqgeeks.com by disabling your adblocker.
×
Please disable the adBlock and continue.
Thank you.
Reload page