+ 2
Hi just started html , let’s see it help to change my future, presently working hard job
<div> how we can used
9 Réponses
+ 3
"<div>" defines classes I believe.
+ 2
A class in general
+ 2
perfect thanks really appreciate.
+ 1
thanks
+ 1
what kind of classes
+ 1
ok
+ 1
much better, can explain through any simpl example
0
div doesn't define any class, it's basically a container that can take any content. a div can have a class (or id) so that it can be stylized to your liking. Also, you can nest Divs indefinitely.
0
For instance
<div class="blog-container">
<div class="blog-article">
<p> Article 1</p>
</div>
<div class="blog-article">
<p> Article 2</p>
</div>
...etc
</div>
You can also, for example, have a div that contains comments within each blog-article div. As I said, whenever you need to divide a section for a particular content, you use a div.
Note that the classes are there to stylize the Divs through CSS, you can name them however you want.