Event hero with ticketing in HTML and CSS
A festival or fair header: dates, venue, featured artists, a real countdown to opening and ticket options.
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
The code in HTML and CSS
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Hero d’événement avec billetterie</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<main class="demo">
<section class="heb" data-heb data-heb-start="2027-06-11T18:00:00+02:00" data-heb-end="2027-06-13T23:59:00+02:00" aria-labelledby="heb-titre">
<div class="heb-main">document.querySelectorAll("[data-heb]").forEach((root) => {
const on = (el, type, fn) => el.addEventListener(type, fn);
const offs = [];
const start = new Date(root.getAttribute("data-heb-start")).getTime();
const end = new Date(root.getAttribute("data-heb-end")).getTime();
const box = root.querySelector("[data-heb-countdown]");
const set = (name, value) => {
root.querySelector(`[data-heb-${name}]`).textContent = String(value);
};
const tick = () => {
const now = Date.now();:root {
--heb-bg: linear-gradient(135deg, #3b0764, #9d174d 55%, #c2410c);
--heb-text: #fff7f2;
--heb-muted: #fbdcd0;
--heb-chip: rgb(255 255 255 / 0.14);
--heb-side: #fffaf6;
--heb-side-text: #2a1420;
--heb-side-muted: #5f4452;
--heb-line: #f1dbe2;
--heb-accent: #9d174d;
--heb-accent-text: #ffffff;
--demo-bg: #f4ecf0;Free component: copy it freely, including for commercial projects.
Other hero sections components in HTML and CSS
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

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

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

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

Editorial hero
FreeA large serif composition, sober and composed, for liberal professions.
- Tailwind
- React
- CSS
- WordPress

A powerful headline followed by a row of three reassuring figures.
- Tailwind
- React
- CSS
- WordPress