Possible Duplicate:
<header> vs. <head>
Do I have to use <div class="header">
as <header>
in HTML5? Somebody explained one question like that <header> vs. <head>. I am a bit confused.
Thanks for any help. I appreciate it.
Possible Duplicate:
<header> vs. <head>
Do I have to use <div class="header">
as <header>
in HTML5? Somebody explained one question like that <header> vs. <head>. I am a bit confused.
Thanks for any help. I appreciate it.
As the linked question explains:
<head>
<title>Your page | Your company</title>
<meta name="keywords" value="blah blah"/>
<link rel="stylesheet" href="css/style.css">
<script></script>
</head>
is still the same in HTML5, for storing meta information and linked scripts etc.
Header is a new element for grouping the header of a page or section symantically.
Including James Simm's info:
Technically, the element in HTML5 represents a group of introductory, or navigation aids. It isn't just for a given page or document. can be used within sectioning elements such as or too. See WHATWG for more info
<header>
<h1>Your page heading</h1>
<nav>
<ul><li>Global Nav Item 1</li></ul>
</nav>
</header>
You do not need to use any of the new tags in HTML5. You can use them if you want though.
<header>
is a semantic tag to mark the header section of your site while <head>
is the are where things like meta tags go.
<head></head>
is where your meta information, scripts, stylesheets etc.. goes.
And header is a bit like <div class="header">
.
The <head>
tag is used outside the body element
Here you load your scripts and style sheets, put your meta data and your page title.
The HTML5 <header>
tag is used to display a header on your page. Containing your logo or your menu. Depending on the site.
These are 2 different tags with 2 different meanings
<header>
, <article>
, <section>
, <aside>
, <mark>
, <footer>
etc are tags added in HTML5 to make your code more meaning full then <div>
.
<div>
is basically for division it's not make clear what content you do have inside your DIV.
<header>
as it's name anyone can understand that it's contain content related to heading
same for article, section, aside, mark they all are tags contain content have to display to user.
<head>
tag do not contain any information have to display on screen to user. It's for your meta tags, to add style sheets, title, keywords etc.
For more information in detail you can check http://html5doctor.com/ It's a excellent website to understand HTML5 in detail