header tag website html code example
Example 1: header html element
<header>
<h1>Main page heading here</h1>
<p>Posted by John Doe</p>
</header>
<!--
A <header> element typically contains:
- one or more heading elements (<h1> - <h6>)
- logo or icon
- authorship information
-->
Example 2: Html header
<header>
<h1>Main page heading here</h1>
<p>Posted by John Doe</p>
</header>