I'm currently using the above tags in this way (classic tag order):
<html>   <head>...</head>   <body>     <header>...</header>     <section>...</section>     <footer>...</footer>   </body> </html> Tag usage and specifications were very rigid in previous versions of HTML (4.x), while HTML5 doesn't really need <head> and even <body> tags.
So I would use the following structure, which IMHO is much more semantic than the previous one.
<html>   <header>...</header>     <!-- put header and footer outside the body tag -->   <body>     <section>...</section>     <section>...</section>     <section>...</section>   </body>   <footer>...</footer> </html> What do you think?
Since the footer is a visible piece of your site, it should go within the body.
HTML5 <footer> Tag The <footer> tag in HTML is used to define a footer of HTML document. This section contains the footer information (author information, copyright information, carriers, etc). The footer tag is used within the body tag.
Because the header of a page is part of the body of the page, just as the footer. Think about this <body> as a human body: Head, middle of the body and the feet. A page has the same concept: Header (is the head), section (middle of the body), and footer (the feet).
Note: You can have several <header> elements in one HTML document. However, <header> cannot be placed within a <footer>, <address> or another <header> element.
Well, the <head> tag has nothing to do with the <header> tag. In the head comes all the metadata and stuff, while the header is just a layout component.
 And layout comes into body. So I disagree with you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With