+ 1

I little confused between div and class plz explain

16th Nov 2016, 3:41 AM
Sainath Dekonda
Sainath Dekonda - avatar
6 ответов
+ 2
div is the container. class is the name of that container. <div class="containername"> ... </div>
16th Nov 2016, 8:07 AM
Junjie Gono
Junjie Gono - avatar
+ 1
Div is used to group things, class is used to format this div with colors, nice fonts, etc...
14th Dec 2016, 1:08 AM
MaiKoz
MaiKoz - avatar
0
<div class="you"> </div> You can select the by (.you) else if you use div in css the whole div element of html will change. 😊
16th Nov 2016, 4:02 AM
NabiL
NabiL - avatar
0
Div is like a building, while class and Id are like bed room
16th Nov 2016, 11:59 AM
ogbo friday
ogbo friday - avatar
0
<div> is used in html and in css. I you use in html it means "container" while in css it is the reference to this " container". if you use < div class="test"> it means that in the css file it is div test{ some style = value;}. So the class is a reference to a style in css while div is a " container" for html. Also if you have in css #div {.......;} it means that all the <div> " containers" in the html file will change according to the values in css file. Hope it helps.
19th Nov 2016, 10:04 AM
Taulant Qirjako
Taulant Qirjako - avatar
0
<div> is a settingless container. class(.foo) in de CSS file defines settings, which you then give to the <div> container. Example: .box { width: 100px; height: 100px; } <div class="box"> lorem ipsum </div> The "lorem ipsum" part is now inside a 100px X 100px box. If you want to check this, just add "border: 5px solid black;" to the ".box" class. This wil draw a 5px black line around the box.
4th Dec 2016, 1:15 PM
Nick van de Wetering
Nick van de Wetering - avatar