Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 Header markup and SEO / absolute position

Tags:

html

header

i would like to put my header and my nav (with html5 markup) in the bottom of my site with

absolute position (top:10px}

Is it valid (ie have a header in the bottom of my site after the footer ?)

<!-- language-all: lang-html -->

<body>
<aside></aside>
<div id="main" role="main"></div>
<aside></aside>
<footer></footer>
<nav>link1 link2</nav>  <--- absolute position top : 150px
<header>                <--- absolute position top : 50px
<h1>Blabla</h1>
</header>
like image 946
prestarocket Avatar asked Feb 22 '26 21:02

prestarocket


1 Answers

From a technical point of view the code will validate as HTML5.

However, one of the main aims of HTML5 is to improve the semantics of code. Which is why new elements were brought in to have more meaning.

So from a semantic point of view this is really not the best way to go about it. Best practice is that the html should flow in the order of content from top to bottom. If the footer is not being used as a footer then it would be better to use a general container such as a div. However if it is being used as the main footer for the page it should really be at the end of your document.

I would point out though, that you can use more than one header and footer element in a page.

like image 126
tw16 Avatar answered Feb 25 '26 14:02

tw16



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!