0
Why are we using . or # before any class in CSS?
1 Resposta
0
Only . can be used before any class in css. And when we use # it becomes an id. And we create classes in css so that we can apply same group of styling to multiple elements of a web page. But there is a huge difference between both id and class. A class can be applied to multiple elements in a page. But u should not use id more than once in ur page because when we use JavaScript on our page, we can get element by id. And JS says there can not be two elements with same id.