HTML Header
This page will teach you how to apply the header elements to a web page.
The HTML <header> element is a container for introductory content or a set of navigational links. It typically contains the section's heading (an h1–h6 element), logo, and navigation.
Here is an example of an HTML header element:
<header>
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
<h1>Welcome to My Website</h1>
</header>
Note that in this example, the header element contains a navigation menu and a heading, but it can contain other elements as well, such as a logo or search form. The header element is typically placed at the top of a page or section and can be styled using CSS to control its appearance and layout.
Last updated