Sub topic 7
Pick a visual that shows the product or outcome
This chapter assumes you can write basic HTML and CSS and know what a hero section is. It covers the supporting visual: the image or product shot next to the headline. By the end you can choose a visual that backs up the offer, and mark it up so it loads fast and stays accessible.
What the visual is for
The headline states the offer. The visual proves it. A visitor who reads "Send invoices in under a minute" should see something that makes that believable, such as the invoice editor with a Send button. If the image could belong to any company, it does no work.
Visitors scan the image before they finish reading. A good visual answers "what is this?" at a glance, and it supports the headline instead of competing with it.
Choose the type of visual
| Type | Best when | Risk |
|---|---|---|
| Product screenshot | The product is software and the interface is easy to read | Too much detail turns into noise at small sizes |
| Outcome photo or illustration | The result matters more than the tool, such as a finished kitchen | Generic stock photos say nothing |
| Short looped video | Motion explains the product better than a still | Heavy files, and a need for pause controls |
| Abstract decoration | Almost never | Takes space and shows nothing |
For Ledgerly, a cropped screenshot of one draft invoice works well. It shows the product and the outcome together. Crop to the part that matters. A full dashboard with twenty controls hides the point.
Mark it up for speed and stability
The hero image is usually the largest element on the page, so it affects load time. Three attributes help.
<img class="hero__image"
src="/img/invoice-editor.webp"
width="640" height="400"
fetchpriority="high"
alt="Ledgerly invoice editor showing a draft invoice with a Send button">widthandheightlet the browser reserve space before the file arrives. Without them, the layout jumps when the image loads.fetchpriority="high"tells the browser this image matters most. Use it on the hero only.- A modern format such as WebP keeps the file small. Export at the size you display, and no larger.
Do not add loading="lazy" to a hero image. Lazy loading delays images until they near the viewport, and the hero is already in the viewport.
The CSS makes the image fit its column and keeps its proportions:
.hero__image {
width: 100%;
height: auto;
}Write alt text that matches the job
The alt text should say what the image shows and why it matters. "Ledgerly invoice editor showing a draft invoice with a Send button" tells a screen reader user what a sighted user sees. Avoid "image of" and avoid stuffing keywords. If an image is purely decorative, use alt="" so assistive technology skips it.
Common mistakes
- Using a stock photo of people smiling at a laptop. It tells the visitor nothing about the product.
- Showing a screenshot with text too small to read at phone width.
- Putting key words inside the image only. Search engines and screen readers cannot read them reliably.
- Loading a 3000-pixel-wide file for a 640-pixel slot.
Exercise
A hero's headline says "Plan your team's week in one view". The image is a stock photo of a smiling group around a table. Name two problems with it, and say what you would replace it with.
Show answer
The photo does not show the product, so it fails to support the claim. It is also generic, so it could belong to any company and adds load time without adding meaning. Replace it with a cropped screenshot of the weekly planning view, with explicit width and height, fetchpriority="high", and alt text that describes what the view shows.