NEW
Font size
WorksheetsCSS Selectors
Total questions: 10
Worksheet time: 2mins
Which of the following selectors selects any tag with an id attribute set?
E#id
.class
#id
*
What will be the output of below mentioned code snippet?
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
The _____________ attribute is used to define the name(s) of the class(es) to which a particular tag belongs.
class
elelment
id
none of the choices
By applying an ___________ a style can be applied to just a single tag.
class rule
element rule
id rule
none of the choices
What type of selector is used in this case?
p {line-height: 150%;}
class selector
element selector
id selector
none of the choices
How many different types of selectors in CSS?
3
4
5
6
An id is NOT always unique within the page so it is chosen to select a single, unique element.
True
False
The universal selector is used as a ?
Wildcard Character
Page Character
Commas character
None of the above
___________ are used to separate each selector in grouping.
#
.
;
,
A ___________ is used to define a special state of an element.
pseudo-tag
pseudo-element
pseudo-id
pseudo-class
