Header Region Example
Header Region
Example Source Code
Source Code
Most websites have a region at the top of every page that contains site-wide information, such as the website logo, search function, and navigation options. This region is referred to as the Banner region.
<header> <h1>This is the Banner region</h1> <p>Note, the attribute role=banner is redundant for HTML5 supported browsers. However, if the Header element is replaced with the <div> element, then the role attribute is needed.</p> </header>
<div role="banner"> <p>This is the page Banner. Note, the attribute role=banner is redundant for HTML5 supported browsers. However, if the Header element is replaced with the <div> element, then the role attribute is needed.</p> </div>
Example Output
Output
This is the Banner region
This is the page Banner. Note, the attribute role=banner is redundant for HTML5 supported browsers. However, if the Header element is replaced with the Div element, then the role attribute is needed.