+ 2

Classes ,div HTML

What are the use of classes ? I mean what is the use of class they don't do anything specific and I don't know anything about div.so guyz plz help me

1st Nov 2018, 6:32 AM
Acash
2 Antworten
+ 9
Acash like how Jay & Flandre Scarlet said, you can use the classes to give same style for the named (signed) blocks of your html code. And use Jay Matthews's example, put this code to css tab: .c1 { margin:10px ; padding:5px; background-color: green; border-color:black; border-style:dashed; text-align:center; } So to reach the given style of the c1 class, use the "." symbol before the name of the wanted class, so now: .c1 😉 reaching the style of the classes on CSS Tab with "." before the name (like .c1{}), reaching id's style with "#" symbol before the name (like #i1 {})
1st Nov 2018, 7:22 AM
Donthack
Donthack - avatar
+ 5
elements with the same class have the same css style
1st Nov 2018, 7:05 AM
Flandre Scarlet
Flandre Scarlet - avatar