The <header> tag is one of the many new tags introduced in HTML5. It is used to mark the header section of a web page. Please remember that it has nothing to do with the <head> tag or any of the <h1> to <h6> tags.
HTML5 header tag is used as a container for introductory content like <h1> – <h6> tags, table of contents, search form, logo etc. with or without navigational links. This tag is generally placed at the beginning of the document or <article> tag. <article> tag is discussed in one of the coming lessons.
Before using the <header> tag, please remember that the <header> tag can't nested i.e. we cannot use a <header> tag within another <header> tag.
Below is a simple example of the usage of the <header> tag:
|<h1>This is the heading of the web page</h1>
|This text also belongs to the header of the web page.
<header> tag can also be used inside an <article> tag:
|<h1>Title of the article</h1>
Please note that the usage of <article> tag is discussed in one of the later lessons.
Next >>> Lesson No. 7: <footer> Tag