HTML5 > Structures

Header in HTML5

How to represent the section’s heading in webpage in HTML5?


By using <headre> tag we can represent the section’s heading in webpage. It can be used either for a web page, section or an article. <header> tag cannot be placed with in a <footer> tag, <address> tag or another <header> tag.

<body>
    <header>THIS IS HEADER.</header>
    <h1>ASP.NET Articles</h1>
    <article>
        <header>This is header of the article.</header>
        <h1>GridView articles</h1>
        <p>Description of all GridView articles</p>
        <!-- article footer -->
        <footer>posted by: Sheo Narayan</footer>
    </article>
    <hr />
    <article>
        <h1>Authentication & Authorization articles</h1>
        <p>Description of all Authentication & Authorization articles</p>
        <!-- article footer -->
        <footer>posted by: Sheo Narayan</footer>
    </article>
    <!-- website footer -->
    <footer>
        <a href="/contactus.aspx">Contact us</a> | <a href="/aboutus.aspx">About us</a> | 
    </footer>
</body>

In the above code snippet we can notice that the <header> tag is not placed in <footer>, <address> or another <header> tags.

Output

Notice that the texts inside the <header> tag indicates the section’s heading.



 Views: 4971 | Post Order: 75



Write for us






Hosting Recommendations