+ 1
What is a div tag?
2 odpowiedzi
+ 1
lets suppose you wanted to align a paragraph to the center of the page by using HTML
you would use <p align="center">This is a paragraph</p>
but what if you had several paragraphs that you want to align them to center?
would you really do this?
<p align="center">This is a paragraph</p>
<p align="center">This is a paragraph</p>
<p align="center">This is a paragraph</p>
that would not look nice right?
well here comes the role of div, by using div you are inserting those paragraphs, or whatever elements, to a group
and apply the customization to the div itself
<div class="article" align="center"/>
<p>This is a paragraph</p>
<p>This is a paragraph</p>
<p>This is a paragraph</p>
</div>
then it got more improved in HTML5, we use the semantic tag <header> instead of <div class="header"> and <section> instead of <div class="section"> .. etc
I
</div>
+ 4
https://www.sololearn.com/discuss/227603/?ref=app
https://www.sololearn.com/discuss/1095460/?ref=app
https://www.sololearn.com/discuss/193734/?ref=app
https://www.sololearn.com/discuss/159092/?ref=app
https://www.sololearn.com/discuss/2459325/?ref=app
https://www.sololearn.com/discuss/966884/?ref=app
https://www.sololearn.com/discuss/953205/?ref=app
https://www.sololearn.com/discuss/2358558/?ref=app
https://www.sololearn.com/discuss/1332905/?ref=app
https://www.sololearn.com/discuss/195069/?ref=app