Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk4 min

How to Create Website Thumbnail Cards with Clickable Links in HTML

Make thumbnail cards responsive and clickable with semantic HTML, clear link names, CSS Grid, and image sizing that avoids layout shifts.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Put each thumbnail image and its descriptive title inside an anchor with a real href, then use CSS Grid and a consistent image box to make the cards responsive. Give meaningful images useful alt text; use alt="" when the image adds nothing beyond the visible title.

Build a card with a real, descriptive link

An anchor’s href supplies the destination. Nest the image and the heading inside that anchor so both belong to the same link. Use a real page URL rather than # when the card should navigate.

As an Amazon Associate I earn from qualifying purchases.

<article class="card">
  <a class="card__link" href="/guides/gardening">
    <img
      src="/images/gardening-thumb.jpg"
      alt="A raised garden bed with leafy vegetables"
      width="640"
      height="360"
    >
    <h2>How to start a garden</h2>
  </a>
  <p>A beginner guide to planning and planting a garden.</p>
</article>

The article groups one self-contained card; the anchor makes its image and title a single navigation target. The visible heading names the destination, which is clearer than generic link text such as “Read more.” See MDN’s anchor element reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose alt text that complements the link title

For a linked image, alternative text should help communicate the destination or the image’s relevant information. If the picture contributes useful context—such as showing the garden—describe it briefly. If it is decorative or merely repeats the visible heading, use alt="" to avoid making assistive technology announce the same idea twice.

#1 Best Overall
Sale
HTML and CSS: Design and Build Websites
  • HTML CSS Design and Build Web Sites
  • Comes with secure packaging
  • It can be a gift option
<a href="/guides/composting">
  <img src="/images/compost-thumb.jpg" alt="" width="640" height="360">
  <h2>How to make compost</h2>
</a>

If an image is the only content inside a link, its alt text needs to identify the link’s purpose or destination. Use an HTML img for meaningful content imagery; CSS backgrounds are suitable for decoration but do not provide an image text alternative. MDN explains image alternatives in its image element reference and HTML images tutorial.

Arrange cards in a responsive grid

CSS Grid can create as many columns as fit while keeping each card above a chosen minimum width. The following minimum is 230 pixels; adjust it and the gap to suit your layout.

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.card {
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  overflow: hidden;
}

.card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card__link:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.card__link img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card__link h2,
.card p {
  margin: 0;
  padding: 0.75rem;
}

.card__link:hover h2 {
  text-decoration: underline;
}

This follows MDN’s card layout recipe. The visible focus outline helps keyboard users identify the active card; Enter activates a focused anchor.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set image dimensions and decide how to crop

Include the source image’s actual width and height attributes when known. They let the browser reserve space while the image loads, helping prevent the surrounding layout from shifting. CSS can still scale the image to the card.

With a 16:9 box, object-fit: cover fills the space but can crop the source. If the subject is off-center, use object-position to adjust the crop, for example object-position: center top. Use object-fit: contain when showing the entire image matters more than filling the box; this can leave unused space around it.

Decide whether the whole card or only some parts link

For a card with one destination, one anchor around the linked image and title is a straightforward pattern. If the card has multiple distinct actions—such as an article link and a separate “Save” control—make each action its own link or control. Do not nest anchors, and ensure each link’s own content explains where it goes.

Common mistakes and fixes

  • The image is not clickable: Check that the img is inside an a element with a valid href.
  • The link has no useful name: Add a visible destination title inside the anchor, or provide suitable alt text if the image is its only content.
  • The thumbnail looks awkwardly cropped: Keep cover for a filled box and adjust object-position; choose contain if the full image must remain visible.
  • The page jumps as images load: Add the image’s intrinsic width and height attributes.
  • Remote thumbnails disappear or change: Prefer images you have permission to publish and host or control. Hotlinking gives you no control if another site removes or changes its image.
  • Keyboard focus is hard to see: Add a visible :focus-visible style to the card link.

Or skip the browser setup

If you need thumbnail source images rather than hand-building browser capture code, ScreenshotNeo is a website screenshot API and MCP server. Its API can return a screenshot or PDF; the example below saves a screenshot as WebP. See the ScreenshotNeo documentation for request options.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo accepts cookie or consent banners and removes 60+ known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and each response indicates the page verdict and billing status. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents. The Free plan includes 1,000 shots a month with no card; paid plans start at $5 for 3,000 shots.

Sign up for 1,000 free screenshots a month, with no card required.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Frequently Asked Questions

Can I make an image clickable in HTML?

Yes. Place the img inside an anchor with a real href; provide meaningful alt text if the image is the link’s only content.

Should every thumbnail use descriptive alt text?

No. Describe information the image adds; use alt="" when it is decorative or the adjacent linked title already conveys its purpose.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Does object-fit: cover show the entire thumbnail?

Not necessarily. It fills the box and may crop the image; use contain when the full image must stay visible.

Quick Recap

SaleBestseller No. 1
HTML and CSS: Design and Build Websites
HTML and CSS: Design and Build Websites
HTML CSS Design and Build Web Sites; Comes with secure packaging; It can be a gift option
$14.94
SaleBestseller No. 2
SaleBestseller No. 4

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.