View video tutorial

HTML Header


The <header> HTML element generally represents the introductory content.

HTML Header Tag

Header represents leading content.

Page header is placed at the top to lead the page.

Section header tells about section introduction in a brief.

Several header elements can be placed in one document.

The <header> element cannot be placed within a <footer> or another <header> element.

Learning with HTML Editor "Try it Now"

You can edit the HTML code and view the result using online editor.


<!DOCTYPE html>
    <title>HTML Header Example</title>
    <meta charset="utf-8" />
    <style> {
            background: no-repeat left/cover url(./resources/images/puppy.jpg);
            display: flex;
            height: 100px;
            min-width: 120px;
            align-items: center;
            color: #fff;
            text-shadow: #000 0 0 .5em;
        }>h1 {
            font: bold calc(1em + 2 * (100vw - 120px) / 100) 'Dancing Script', cursive,
            margin: 3%;

    <header class="page-header">
        <h1>Cute Puppies Expression</h1>
Try it Now »

Click on the "Try it Now" button to see how it works.