+ 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.
5 Answers
+ 2
Well thanks Anhjje but how can we use footer header etc can u plz help me with a code that is simple
+ 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.
0
p cuvi (pcuv18) can we simply use footer without using header or article tags
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>
- 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>