Skip to content

Centered gradient hero in HTML and CSS

A centered headline over a soft gradient background, with two actions and a reassurance line.

Here is an excerpt of this component's code in HTML and CSS. The full code is free for members, ready to copy into your project.

This component also comes in

Open in a new tab

The code in HTML and CSS

index.html
<!doctype html>
<html lang="fr">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Section d'accueil centrée à dégradé</title>
    <link rel="stylesheet" href="style.css" />
  </head>
  <body>
    <main class="demo">
      <section class="glow-hero">
        <p class="glow-hero__eyebrow"><span>Nouveau</span> Rapprochement bancaire automatique</p>
style.css
:root {
  --glow-bg: #f8faff;
  --glow-a: #c7d7ff;
  --glow-b: #e9d5ff;
  --glow-text: #0b1736;
  --glow-muted: #3b4a6b;
  --glow-accent: #2347d6;
  --glow-accent-text: #ffffff;
  --glow-chip: #ffffff;
  --glow-ring: #2347d6;
  --demo-bg: #f8faff;
  --demo-text: #0b1736;

Free component: copy it freely, including for commercial projects.

Hero sections components in HTML and CSS
  • A dark hero where very large words, outlined or at low opacity, pass behind a two-column text. The animation is CSS only, with no script and no image.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A festival or fair header: dates, venue, featured artists, a real countdown to opening and ticket options.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Headline, service area, Google rating and job-site photo, with a direct call button and a short callback form (name, phone, need).

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A bright, warm hero: highlighted promise, two buttons, an avatar stack with a rating out of 5, and on the right a customer quote surrounded by result chips.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Headline, promise and two actions on the left, vector illustration on the right.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A large serif composition, sober and composed, for liberal professions.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component