html - Difference between these selectors -


this question has answer here:

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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -