html - Difference between these selectors -
this question has answer here:
- why spaces used separate things in css 3 answers
is there difference between these selectors?
div.demo
, div .demo
div#demo
, div #demo
does select same element?
div.demo{some code} div .demo{some code}
yes, there is.
div.demo
match div
class demo
<div class="demo">
div .demo
class demo
inside div
:
<div> <span class="demo"> </div>
same id selector #
.
Comments
Post a Comment