Skip to content

Blog Post Header with Author and Cover Photo

Bootstrap 5 article header with breadcrumb, serif headline, standfirst, author photo, date, reading time, share and save buttons and a wide cover photo.

Also known as: article header, blog post hero, post title section with author, editorial article header

Blog Post Header with Author and Cover Photo live demo

Open in new tab

Bootstrap 5 code (HTML, CSS, JS)

An editorial Bootstrap 5 article header with breadcrumb, a large serif headline, an italic standfirst, an author row with photo, date and reading time, share and save buttons, and a wide cover photo with a caption. Use it at the top of blog posts, magazine stories, case studies and long-form guides.

How it works

The root is header.bh-header on a warm paper background. The text sits in .bh-narrow, a container limited to 52rem for a comfortable line length, while the cover photo uses the wider .bh-wide container so it breaks out of the text column. The Bootstrap breadcrumb is restyled by .bh-crumbs, the headline is h1.bh-title with a fluid clamp() font size and the subtitle is .bh-dek.

The .bh-byline row is a flex container that wraps on small screens. On the left are the round .bh-avatar with a double ring, the author link, the .bh-role pill and .bh-meta with a time element and the reading time. On the right are three round .bh-action controls: copy link, share by email and save. The figure.bh-cover image is cropped with object-fit: cover to 16:9 on phones and a wider ratio from 992px.

The script runs on DOMContentLoaded for every .bh-header. The .bh-copy button tries navigator.clipboard.writeText() with the page address; if the clipboard is blocked, it shows the address instead. The .bh-save button toggles aria-pressed and the bookmark icon. Both report their result in .bh-status, which clears itself after four seconds and is hidden while empty.

The photos come from Unsplash; replace them with your author photo and cover image.

Customization

  • --bh-accent in .bh-header: recolors the avatar ring, role pill, active breadcrumb, saved button and focus outlines.
  • --bh-paper, --bh-ink and --bh-muted in .bh-header: change the background and text colors.
  • --bh-cover-ratio and --bh-cover-ratio-lg in .bh-header: set the cover crop on phones and desktops, e.g. 21 / 9.
  • max-width: 52rem in .bh-narrow: widen or narrow the text column.
  • Replace container-xl with container-fluid px-0 on .bh-wide for an edge-to-edge cover.
  • The messages in the say() calls in script.js: change the wording or connect .bh-save to your reading list API.

Use cases

  • Blog posts: breadcrumb, headline, standfirst and author row open an article in a clean editorial style
  • Magazine stories: a wide cover photo with caption sits below the text column
  • Case studies: date, reading time and author role give readers context before they start
  • Long-form guides: copy link, email share and save buttons sit in the byline

Accessibility

The header is labelled by #bh-title, the breadcrumb is a labelled nav with aria-current="page", and the date uses a machine-readable datetime. Icon-only controls have an aria-label, the save button exposes its state with aria-pressed, and .bh-status is a role="status" live region. Images have descriptive alt text, and transitions stop under prefers-reduced-motion: reduce.

Usage notes

Requires Bootstrap 5 and Bootstrap Icons. The clipboard API only works on HTTPS pages.

Blog Post Header with Author and Cover Photo at a glance

Framework
Bootstrap 5
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Bootstrap 5, Bootstrap Icons
Layout
Responsive, works on mobile
Category
Headers
License
Free for personal and commercial use

Questions about this template

Can I use the Blog Post Header with Author and Cover Photo 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?

Load Bootstrap 5 and Bootstrap Icons from a CDN (the links are under Requirements). Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

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

Add these to your page (already included in the download):

  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
  • <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
Blog Post Header with Author and Cover Photo – Bootstrap 5 headers component screenshot
Blog Post Header with Author and Cover Photo · Bootstrap 5 Headers

More Headers

Page Header with Stats – Tailwind CSS headers preview

Page Header with Stats

Tailwind CSS dashboard page header with breadcrumb, project meta info, action buttons and stat chips that update with a date range switch.

Page Header with Breadcrumb – Bootstrap 5 headers preview

Page Header with Breadcrumb

Dark Bootstrap 5 page header with breadcrumb, title and status badge, copy-link and dropdown actions, and section tabs.