HTML header tag

<header> tag contains the introductory content of a section or a page. It includes logos, search input and navigational links of other pages. It may contain headings (h1-h6).

Example

<header>
  <h1> web site </h1>
  <p> website is a set of informative webpages running on the broswers. </p>
  <dl>
  <dt>Home</dt>
  <dd> <a href="https://www.codingb.com/html"> Visit home page </a> </dd>
  <dt>HTML</dt>
  <dd> <a href="https://www.codingb.com/html"> Learn html </a> </dd>
  </dl>
 </header>
Try </>

Specific uses

It represents the introductory content for a section or a page. It contains the navigational links, headings etc.

Example

 <header>
 <img src="files/logo.png" width="200px" height="200px"/>
 <nav>
 <ul>
  <li> <a href="#">Home</a> </li>
  <li> <a href="#">tutorials</a> </li>
  <li> <a href="#">about</a> </li>
 </ul>
 </nav>
</header>

Try</>

Tag omission

Both opening and closing tags are necessary for the header element.

Global Attributes

All global attributes are applicable on the header element.



Was this article helpful?

 

Email:

Message:

Get the newsletter