+ 1
What <div> or </div> tag and for what and why it is used?
4 Réponses
+ 2
It makes "block".
For example if you have article then you want to have block with header of article and block with content then you will probably do:
<article>
<div>
Title
</div>
<div>
Content of article.
</div>
</article>
It is useful for identify block from website in CSS sheets. You can make <div id="headofarticle"></div> and make visual concept of this block in CSS only for this div.
#headofarticle {
color: #FFFFFF
}
+ 2
what is full form of div tag
+ 2
There are a lot of options for div. I think (but not sure) the most valuable are id= and class= and maybe style= if you want to edit visual concept of it in html not CSS.
0
check this as a sample of using div
https://code.sololearn.com/WNvSp3Q9S5GD/?ref=app