Note/Info The <header> tag is a new tag in HTML5.
HTML5 <header> tag
The <header> tag in HTML5 contains heading elements, title, logo, author information, etc.
This acts as a container to introduce a subject or content.
You can also use this as container for the navigational links.
Note/Warning/Danger/Info Do not confuse the <header> element with the <head> tag. Do not place the <header> element inside <address>, <footer> or another <header> tag.
Syntax:
<header>
<element1>
<element2>..
</header>
Example
<header> <h2>Welcome to HTML Tutorial</h2> <p>Best website to Learn HTML is TutorialBrain</p> </header>
How Browser will display
BLOCK Level.
Difference between HTML4.01, XHTML and HTML5
HTML4 | XHTML | HTML5 |
---|---|---|
NA | NA | New tag added in HTML5 |
Attributes used with <header> tag
NONE
Global Attributes
The <header> tag supports Global attributes.
Event Attributes
The <header> tag supports Event attributes.
Default CSS Value
display: block;
Supporting Browsers
Related Tags
<address>, <footer>, <p>, <h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <div> & <section> tags.