+ 2

What is the significance of using the < div> tag in HTML5

Often it is stated that div tag is used to divide the file in different parts but what does it helps in. My question may be silly as I am begineer in web development . Hope u help me.

18th May 2019, 1:57 PM
Ayush Pandey
Ayush Pandey - avatar
5 ответов
+ 2
Well thanks Anhjje but how can we use footer header etc can u plz help me with a code that is simple
18th May 2019, 2:05 PM
Ayush Pandey
Ayush Pandey - avatar
+ 1
divs are generic containers, boxes that web devs use to manage their websites. You can use it to store text, draw blocks, move the box around, you eventually define classes and IDs to divs and basically is the most used tag in html. html5 has new tags such as <nav> <header> <article> <footer> - imagine using divs and just defining them as <div id="header" > or anything else.
18th May 2019, 2:03 PM
HNNX 🐿
HNNX 🐿 - avatar
0
p cuvi (pcuv18) can we simply use footer without using header or article tags
24th May 2019, 7:21 AM
Ayush Pandey
Ayush Pandey - avatar
0
correction to p cuvi <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <!--html--> <div id="header">This is a Heading. It goes at the top of page</div> <div id="article">articles go in the middle</div> <div id="footer">This is a footer. It goes at the bottom of the web page</div> <!--HTML5--> <header>This is a Heading. It goes at the top of page</header> <main> <section>We use this section as div</section> <section>We use this section as div</section> <section>We use this section as div</section> </main> <footer>This is a footer. It goes at the bottom of the web page</footer> </body> </html>
24th May 2019, 10:48 AM
MarJan
MarJan - avatar
- 1
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <!--html--> <div id="header">This is a Heading. It goes at the top of page</div> <div id="article">articles go in the middle</div> <div id="footer">This is a footer. It goes at the bottom of the web page</div> <!--HTML5--> <header>This is a Heading. It goes at the top of page</header> <article>articles go in the middle</article> <footer>This is a footer. It goes at the bottom of the web page</footer> </body> </html>
24th May 2019, 5:23 AM
Patricio Cuvi
Patricio Cuvi - avatar