+ 4

What <div> tag do?

can anyone send a program using this tag.....And plz also describe the use of this tag...

6th Oct 2017, 7:19 PM
phenom**
phenom** - avatar
3 Respuestas
+ 3
Example: https://code.sololearn.com/Wby7PqVw36LL/?ref=app See the sections of this blog. These are the div elements.
7th Oct 2017, 3:10 AM
Rishita
Rishita - avatar
+ 2
I am new to the programming and web-design, but i think that <div> is used to make a group, and latter you can change them in CSS. This is one code: <!DOCTYPE html> <html> <head> </head> <body> <style> #randomthing { text-align:center; color: red } </style> <div id=randomthing> <h1>Text</h1> <p>Paragraph</p> </div> </body> </html> Copy this code here https://code.sololearn.com/#html . Then remove whole <style></style>. You will see the difference
6th Oct 2017, 8:36 PM
Ice
Ice - avatar
+ 1
The <div> element is often used as a container for other HTML elements or to divide a page into different sections.
7th Oct 2017, 3:04 AM
Rishita
Rishita - avatar