Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

html5

What is the <header> element in HTML?

Abdul Monum

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

The <header> element in HTML is used to display the introductory content of the webpage. This includes the heading, any sub-headings, logo, author’s name, and navigational links for the website. For example, <header> can be used to wrap the title of an article, the author’s name, and the byline of the article.

Elements that can be used inside the <header> element include:

  • <h1>-<h6>
  • <hgroup>
  • <p>

However, <header> cannot be placed under:

  • another <header>
  • <footer>
  • <address>

Example

Explanation

In lines 5-11, you can see the <header> element and the elements inside it that display the introductory content of the simple webpage.

  • <hgroup> groups the <h1>, <h2>, and <h3> headings.
  • <h1> and <h2> display the main heading of the page.
  • <h3> heading displays the author of the page.
  • <header> acts as a container that wraps this introductory content.

RELATED TAGS

html5

CONTRIBUTOR

Abdul Monum
Copyright ©2022 Educative, Inc. All rights reserved

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring