How to Create a Responsive Website Banner

Web Development Post by Christopher Spicer
Responsive Website Banner

Vision is the strongest of our human senses. Though words may be the most effective tool to communicate information. It is the expressive nature of images that holds the ultimate power to capture a person's attention.

And no element in web design combines words and images more successfully than a good banner.

So what exactly is a banner? A banner (commonly called a "hero image") is an eye-catching extension of your website's header that includes a large, prominent image, often displayed with in combination with a text heading and a call-to-action (CTA) button. It is the visual centerpiece that introduces visitors to the overall message and theme of your website.

Okay, so what is a good banner? A good banner:

  • Is illustrated by a relevant and emotionally evocative image that looks good and loads quickly at all screen sizes
  • Is complemented and clarified by concise but engaging text that is clearly legible atop the image
  • Inspires visitors to take action (commonly called "conversion" - purchasing a product, subscribing to a service, donating money, etc.)

This article, which is part of a series of web development tutorials, will guide you through the process of creating a website banner. We'll use HTML, CSS, and JavaScript to construct four banner layouts - a banner with an image, a banner with parallax scrolling, a banner with text, and a banner with a text box. With each example, we’ll examine a complete web page demonstration before taking a detailed look at the concepts and code that bring it to life.

This article builds upon topics discussed in How to Create a Responsive Website Layout.

In this article, we'll use our standard HTML document structure and CSS naming convention.

Skip Ahead

Looking for something specific? Select a topic in this article to read more: