It is an oversimplification to say that “<header>
tag is another way of writing <div class="header">
”, but it is true that it is meant to be used where authors have often used a div
with a class attribute.
The header
element is by no means a replacement for head
. The two have little in common beyond the similarity of names.
The observation that replacing head
tags by header
tags does not seem to have any effect has a natural explanation: neither of these tags has much effect anyway. The only real effect is that header
is a block level element, but in most cases this does not matter, especially if all its child elements are block level elements, as they typically are. Similarly, you would see no effect if you replaced head
tags by foobar
tags (I mean literally <foobar>
and </foobar>
).
Nominally, <head>
indicates the head part of a document, which may contain a few different tags only. In practice, apart from some abnormal cases, the <head>
and </head>
tags have no effect (and they are optional, by the specifications, except in XHTML). Elements like title
and meta
are recognized without them. The entire division of a document to head
and body
parts is just formal and conceptual.
The header
tags as such have no effect, beyond the block thing and beyond creating an element node, which you can style in CSS or process with JavaScript.