E[attr^=value]
E[attr$=value]
E[attr*=value]
None of these
E ~ F
::after
:checked
:default
:%
:disabled
:element
:empty
:enabled
:first-child
:last-child
::first-line
::first-letter
:!(s)
:nth-child(s)
:not(s)
:root
:nth-oftype(n)
:only-child
class
id
type
None of the above
h1.all {background-color:red;}
h1 {background-color:red;}
all.h1 {background-colorred;}
.h1{background-color:red}
<p style="font-size:bold;">
p {text-size:bold;}
<p style="text-size:bold;">
p {font-weight:bold;}
div p
div.p
div + p
div ~ p
Separate each selector with a plus sign
Separate each selector with a comma
Separate each selector with a space
All of These
tag
both b) and c)
*test
#test
.test
test
article
html
demo
#demo
.demo
*demo
h1.hover
h1*hover
h1:hover
h1-hover
p h4 a { color: orange; }
p; h4; a { color: orange; }
p+a+h4 { color: orange; }
h4, a, p { color: orange; }
Seperate each selector with a star
p
p.style
p-style
.style