HTML <header>
query_builder | Christopher PisaniThe HTML element <header> contains information for a section, like a heading (h1-h6) element, a logo and navigation links.
<style>
header.page-header {
background: no-repeat left/cover url(https://interactive-examples.mdn.mozilla.net/media/examples/puppy-header-logo.jpg);
display: flex;
height: 120px;
min-width: 120px;
align-items: center;
color: #fff;
text-shadow: #000 0 0 .2em;
}
header.page-header > h1 {
font: bold calc(1em + 2 * (100vw - 120px) / 100) 'Dancing Script', cursive,
fantasy;
margin: 2%;
}
main {
font: 1rem 'Fira Sans', sans-serif;
}
</style>
<header class="page-header">
<h1>Cute Puppies Express!</h1>
</header>
<main>
<p>I love beagles <em>so</em> much! Like, really, a lot. They’re adorable and their ears are so, so snuggly soft!</p>
</main>
Available Attributes
No specific attributes are assigned for this element, other than the standard global attributes.