Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<Header> tag HTML5 inside div

Tags:

html

seo

just wondering, is it bad practice to place a <header> tag inside a div tag when designing a site that mostly uses html5 elements and the doctype is for html5? Thanks!

Also, should I place the Nav outside the header or inside, or does it really matter?

like image 480
crsMC Avatar asked Apr 28 '14 18:04

crsMC


People also ask

Can I put a header inside a div?

No, as long as you respect the content semantics and that your header contains header information. You can wrap it in a div with no SEO drawbacks.

Is header tag inside body?

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).

How do you add a header in HTML5?

The <header> tag in HTML is used to define the header for a document or a section as it contains the information related to the title and heading of the related content. The <header> element is intended to usually contain the section's heading (an h1-h6 element or an <hgroup> element), but this is not required.

Where do you place the header tag in HTML?

Header element and accessibility The <header> element specified at the top of your HTML - the one closest to our <body> element - is always interpreted as the introduction of the webpage.


Video Answer


2 Answers

I do not believe that it is a bad practice. However, still make sure you have it placed int the general area where it should be.

Here is a link that might help you understand the location of your header.

like image 170
Josef E. Avatar answered Sep 22 '22 03:09

Josef E.


No, as long as you respect the content semantics and that your header contains header information. You can wrap it in a div with no SEO drawbacks.

like image 41
web-tiki Avatar answered Sep 22 '22 03:09

web-tiki