Skip to content

Split Hero with Diagonal Photo Clip

Pure CSS split hero with headline, buttons and stats beside a full-height photo cut on a diagonal with clip-path, plus an accent stripe and rating badge.

Also known as: split screen hero, diagonal hero section, hero section with image, landing page header with photo

Split Hero with Diagonal Photo Clip live demo

Open in new tab

Pure CSS code (HTML, CSS)

A split hero section in pure CSS with copy on the left and a full-height photo on the right whose inner edge is cut at an angle with clip-path. A thin accent stripe follows the diagonal, and a rating badge floats over the image. It suits travel and tour sites, agencies, outdoor brands and any landing page that needs a strong first impression with a single photo.

How it works

The root section.hdp is a CSS grid. .hdp-copy contains the eyebrow line, the h1.hdp-title with a highlighted .hdp-mark phrase, the .hdp-lead paragraph, two buttons in .hdp-actions and a dl.hdp-stats list. The stat items use flex-direction: column-reverse, so the number appears above its label while the markup keeps the correct dt/dd order.

The photo lives in figure.hdp-media. From 900px the grid has two equal columns and img.hdp-img is absolutely positioned to fill its column with object-fit: cover. The diagonal comes from clip-path: polygon() whose first point is moved right by --hdp-cut. The .hdp-media::before pseudo-element draws the accent stripe as a narrow polygon with the same slope, just left of the photo. On smaller screens the figure moves above the text with order: -1, gets a fixed height and the diagonal flips to the bottom edge, controlled by --hdp-cut-mobile. The figcaption.hdp-badge shows the rating. No JavaScript is used.

The photo comes from Unsplash; replace it with your own image.

Customization

  • --hdp-cut on .hdp: how far the diagonal leans on desktop; 0% gives a straight split, 30% a steep angle.
  • --hdp-cut-mobile: height of the slanted bottom edge of the photo on phones.
  • --hdp-accent: primary button and eyebrow color; --hdp-stripe colors the diagonal stripe separately.
  • --hdp-highlight: marker color behind .hdp-mark and the star in the badge.
  • --hdp-bg and --hdp-ink: background and text color of the copy side.
  • --hdp-min-height: minimum height of the hero on desktop.
  • Remove figcaption.hdp-badge or the dl.hdp-stats block for a cleaner, minimal hero.

Use cases

  • Travel and tour companies: a headline and booking button beside a large destination photo
  • Agencies and studios: introduce the business with stats and a strong image
  • Outdoor and lifestyle brands: a product or campaign photo cut on the diagonal
  • Landing pages: the first screen of any page that is built around one photo

Accessibility

The section is labelled by its h1 with aria-labelledby. The photo has a descriptive alt text, width/height attributes and fetchpriority="high" instead of lazy loading, because it is above the fold. The star icon is aria-hidden and the rating is plain text. Statistics use a description list, so label and value stay connected for screen readers. Buttons have a visible amber focus outline, text colors meet WCAG AA contrast on the sand background, and the only motion (a small button lift) is disabled with prefers-reduced-motion: reduce.

Usage notes

clip-path with polygon() is supported in all current browsers. If you only want one h1 per page and already have one, change the heading to h2.

Split Hero with Diagonal Photo Clip at a glance

Framework
Pure CSS
Code
HTML, CSS
JavaScript
Not needed, CSS only
Dependencies
None
Layout
Responsive, works on mobile
Category
Hero Sections
License
Free for personal and commercial use

Questions about this template

Can I use the Split Hero with Diagonal Photo Clip code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

There is nothing to install. Paste the HTML where the component should appear and add the CSS to your stylesheet. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. It is built with HTML and CSS only, so there is no JavaScript to load.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

No dependencies. Pure HTML, CSS and JavaScript.

Split Hero with Diagonal Photo Clip – Pure CSS hero sections component screenshot
Split Hero with Diagonal Photo Clip · Pure CSS Hero Sections

More Hero Sections

Hero with Rotating Words – Pure CSS hero sections preview

Hero with Rotating Words

Dark hero section whose headline cycles through words with a slide-and-fade animation, a pause button and decorative stat cards.

Split Hero with App Screenshot – Tailwind CSS hero sections preview

Split Hero with App Screenshot

Dark Tailwind CSS split hero with gradient headline, two CTA buttons and an animated mock app dashboard built entirely from divs.

Dark Gradient Hero – Bootstrap 6 hero sections preview

Dark Gradient Hero

Dark Bootstrap 6 hero with a blurred gradient mesh, gradient headline, glowing CTA, copyable install command, decorative orb with stats and a row of trust logos.

Split Hero with Stats – Bootstrap 6 hero sections preview

Split Hero with Stats

Bootstrap 6 split hero with a highlighted headline, CTAs and avatar social proof beside a bento grid of key stats with a 12-month / all-time toggle.

Hero with Search Bar – Bootstrap 6 hero sections preview

Hero with Search Bar

Bootstrap 6 directory hero on a photo background with a large pill search bar, a searchable area Combobox, popular search chips and category tiles.

SaaS Hero with App Screenshot – Bootstrap 6 hero sections preview

SaaS Hero with App Screenshot

Bootstrap 6 SaaS hero with a New badge, gradient headline, two CTAs and an app screenshot in a browser frame with switchable tabs and a tour Dialog.