Differences between # and . In CSS | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 2

Differences between # and . In CSS

Hi guys, When i was reading and looking through some examples of css on sololearn, some program they use uses # and some . May i know the difference? Eg: .p{} And #body{}

3rd Nov 2018, 10:20 AM
Ryan Chandra
Ryan Chandra - avatar
1 ответ
+ 1
n the CSS, a class selector is a name preceded by a full stop (“.”) and an ID selector is a name preceded by a hash character (“#”). The difference between an ID and a class is that an ID can be used to identify one element, whereas a class can be used to identify more than one. http://www.htmldog.com/guides/css/intermediate/classid/
4th Nov 2018, 10:26 AM
deepak sharma
deepak sharma - avatar