Summary -

In this topic, we described about the <header> tag along with detailed example.

The <header> tag is new in HTML5. The header of the page or section. It contains the introduction information about the page or section. The <header> tag used to specify the header of the page in HTML document.

Header can contains logos, headings, sub headings navigation controls, authorization information, search forms etc,. The tag can be specified like <header></header> with the header content inside the opening and closing tags.

<header> tag is an optional tag. One document can contain multiple <header> elements. <header> can’t be coded within another <header> tag.

Syntax -

<header>.. text here.. </header>

Example -

<!DOCTYPE html>
<html>
	<head>
		<title>Header example</title>
	</head>
	<body>
		<header>
			<h1>Heading of the document</h1>
			<img src="img/header.png" width="300" height="120"/>
		</header>
	</body>
</html>

Output -

Heading of the document

Header Tag