There is no official standard for web page header size. Still, a full-screen background of about 1920 x 1080 pixels and a desktop navigation bar roughly 70 to 100 pixels tall cover most sites. Keep the header image under about 200 KB (kilobytes, a measure of file weight) where you can. Treat every number below as a common starting point, then adjust it to your design and your real visitors. The point is broken down further in this analysis.

Recommended header dimensions at a glance

These values are common working recommendations used by designers, not rules from a standards body. Aspect ratio is the width divided by the height, written as a ratio such as 16:9. Image size also means two different things: pixel dimensions, which set how large and sharp the image looks, and file size, which sets how much data the browser must download.

Header element Desktop (px) Tablet (px) Mobile (px) Aspect ratio Target file weight
Full-screen background or hero 1920 x 1080 for full screen; shorter heights for a hero band Scaled between desktop and mobile versions 1080 x 1350 (portrait crop) 16:9 (desktop), 4:5 (mobile) Ideally under 200 KB; below 1 MB at most
Standard navigation bar Full width x 70 to 100 Same as desktop or slightly smaller Smaller than desktop, kept compact Not applicable (a container, not an image) No image needed, CSS only
Blog header (featured image) 1200 x 630 or larger Scaled from desktop Scaled from desktop About 1.91:1 As light as quality allows
Header logo Around 250 x 100, up to about 320 wide Same as desktop Must fit a screen roughly 320 to 500 wide Depends on the logo SVG usually a few KB

The 1920 x 1080 value for full-width backgrounds and 1280 x 720 for smaller banners are widely quoted. So is the 70 to 100 pixel range for desktop header height.

The 1200 x 630 blog size matches the image size Meta recommends for Open Graph link previews. An Open Graph image is the picture shown when a page is shared on social networks. Check each platform’s current guidelines before finalising.

website design

What is the best size for a web page?

A web page has no single ideal size, because it adapts to the visitor’s screen. What you design for is the viewport, the visible area of the browser window.

Public statistics such as StatCounter’s screen resolution report show that 1920 x 1080 (Full HD) is the most common desktop screen resolution worldwide. Phones are usually between about 320 and 500 pixels wide. Even the most common desktop size is a minority of visitors, so check your own analytics for the screen sizes of your audience.

The practical approach is to design the header for a 1920 pixel canvas, then make sure it still works on smaller desktop and phone widths. Keep the main content container to roughly 1140 to 1320 pixels, a frequent convention in frameworks such as Bootstrap. Let the background of the header stretch edge to edge. You will find the same thinking at a design studio worth a look.

what is the average header size

What is the average header size?

For the navigation bar, most desktop sites land between 70 and 100 pixels tall, and mobile headers are usually smaller. A hero header is far more variable. It can be a short band or a full-screen background, so test your own layout. Use a smaller header for informational pages and a bigger one for landing pages.

A useful rule is that the logo should not fill the bar. Leave comfortable padding above and below it. Keep the whole header compact enough that the main content stays visible above the fold, which is the part of the page seen without scrolling.

Responsive cropping and safe areas

A header image is rarely shown at its exact export size. With the CSS property object-fit: cover or background-size: cover, the browser scales the picture to fill its box and crops what overflows. CSS stands for Cascading Style Sheets, the language that controls a page’s look. A wide landscape image therefore loses its left and right edges on a narrow phone screen. Portrait and landscape screens also show different areas of the same image.

To protect the important content, define a safe area, meaning the central zone that must stay visible at every size:

For a responsive website, the classic rule for flexible images still works. img { max-width: 100%; height: auto; } lets the picture shrink with its container without distortion. wordpress.org walks through the specifics.

two adults are seen working on a website flowchart

Retina exports and image formats

Retina and high-density screens

High-density displays use more physical pixels than CSS pixels.

A CSS pixel is the unit the browser lays out. An image shown at 1000 CSS pixels wide looks blurry if exported at exactly 1000. The common fix is to export at twice the display size, called @2x. Then let the browser choose with srcset and sizes. The same logic applies to logos: a site that offers a retina logo option should receive dimensions doubled.

Do not simply double everything for the hero, since a very large file harms loading. Often a 1920 pixel image is enough, and a larger version is reserved for big screens.

Choosing a file format

For a favicon, the small icon in the browser tab, use a square .ico or .png file of 16 x 16 up to 32 x 32 pixels.

File size, compression and loading speed

A bigger image looks sharper, but it slows the page. Slow pages frustrate visitors, who may leave, and page speed also matters for search results. Resize the image to the dimensions where it will be displayed before uploading. A 4000 pixel camera photo is unnecessary for a header.

Compression shrinks the file, and free online tools can do it. Lossless compression keeps the highest quality but often creates large files, so lossy compression is usually the better trade for header photos.

The hero image is usually the largest element on the page, so it often determines Largest Contentful Paint (LCP). LCP is one of Google’s Core Web Vitals and measures how fast the main content appears. Google’s current guidance recommends keeping LCP within 2.5 seconds. To help:

  1. Do not lazy-load the hero image, since it sits above the fold. Use fetchpriority="high" on it instead.
  2. Always set width and height attributes, or CSS aspect-ratio, so the layout does not jump (Cumulative Layout Shift).
  3. Keep the file as light as quality allows, and serve responsive sizes with srcset.
  4. Prefer a CSS background colour or a small poster image over a heavy autoplay video.

Give each picture a descriptive file name and an alt text, a short description that screen readers read aloud. Leave the alt text empty for purely decorative images.

two people are working on an application development project

Sticky header height

A sticky header stays fixed at the top while the visitor scrolls. It is convenient for navigation, but it permanently hides part of the screen. This hurts most on small phones in landscape mode. A compact version that shrinks on scroll is a common compromise. A sticky bar made of CSS and an SVG logo adds almost no weight, so its cost is screen space, not bandwidth.

What is a good font size for a header?

Headings should be clearly larger than body text, and body text should stay comfortably readable on a phone. HTML headings run from h1 as the largest to h6 as the smallest. Use them to reflect structure, not just to change size.

Use relative units such as rem or clamp() so text scales with the screen and with the user’s browser settings.

Contrast matters as much as size. WCAG 2.2 (the Web Content Accessibility Guidelines) asks for a minimum contrast ratio of 4.5:1 for normal text and 3:1 for large text. This is especially important when text sits over a photo. Add a dark overlay if needed.

Common mistakes to avoid

Start with the table, test the header on a real phone and a large monitor, and adjust from what you see. At The Balance, we build on the same principle: measure first, then refine, and keep every pixel justified by what it brings to the visitor.