Skip to content

Article Layout

Bootstrap 5 long-form article layout with drop cap, wide figure, pull quote, author box and a sticky reading progress bar.

Also known as: blog post layout, long form article layout, article page design, reading progress bar

Article Layout live demo

Open in new tab

Bootstrap 5 code (HTML, CSS, JS)

A Bootstrap 5 long-form article layout with a serif reading column, drop cap, wide figure, pull quote, tag list, author box and a slim reading progress bar. Use it for blog posts, magazine features and case studies.

How it works

The wrapper .arl-page sets a warm paper background and all design tokens. Inside it, article.arl-article is a Bootstrap container capped at the --arl-measure line length plus padding.

.arl-header holds the category link, the h1.arl-title with fluid clamp() sizing, an italic .arl-dek subtitle and a .arl-meta row with initials avatar, author link, date and read time. .arl-body uses a serif stack with a 1.75 line height.

The first paragraph, .arl-lead, gets a floated drop cap through ::first-letter. .arl-figure wraps an image and a caption with an accent border; from the lg breakpoint it breaks out of the text column with negative margins. .arl-pullquote is a figure with a blockquote, a thick top rule and a large decorative quotation mark from ::before. .arl-list replaces bullets with em dashes through ::marker. The aside.arl-author box stacks on phones and sits side by side from 576px.

The script runs on DOMContentLoaded. A requestAnimationFrame-throttled scroll and resize handler measures each .arl-article and writes a value between 0 and 1 into the --arl-progress custom property of .arl-progress__bar, which scales the bar with transform: scaleX(). The .arl-progress track is position: sticky, so it stays at the top of the viewport while you read. The .arl-follow button toggles aria-pressed and switches its text and icon between "Follow" and "Following".

Customization

  • --arl-accent and --arl-accent-soft in .arl-page: recolor the drop cap, links, progress bar, quote mark and the active follow button.
  • --arl-paper and --arl-ink in .arl-page: change the page background and text color, for example to a dark reading theme.
  • --arl-measure in .arl-page: widen or narrow the reading column.
  • --arl-serif and --arl-sans in .arl-page: swap the body and interface font stacks.
  • font-size: 4.2rem in .arl-lead::first-letter: resize the drop cap, or delete the rule to remove it.
  • margin-inline: -4rem in .arl-figure (inside the 992px media query): set to 0 to keep figures inside the text column.
  • Remove .arl-progress from the markup to drop the reading progress bar; the script then skips it.

Use cases

  • Blog posts: a serif reading column with a drop cap gives long articles a polished look
  • Magazine features: a wide figure and pull quote break up the text and add visual rhythm
  • Case studies: an author box and tag list close the article with credit and related topics
  • Long reads: a slim reading progress bar shows visitors how much of the article is left

Accessibility

The article is labelled by its h1 through aria-labelledby. The progress bar is decorative and marked aria-hidden="true", and the avatars are hidden from screen readers because the author name is in text next to them. The figure has descriptive alt text and a real figcaption; the pull quote uses figure, blockquote and figcaption. The author box is an aside with its own label, and the follow button exposes its state with aria-pressed. Links and buttons get a clear :focus-visible outline in the accent color.

Usage notes

Requires Bootstrap 5 (added automatically) and Bootstrap Icons. Do not put overflow: hidden on an ancestor of the article, or the sticky progress bar will stop sticking.

Article Layout 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
Content Sections
License
Free for personal and commercial use

Questions about this template

Can I use the Article Layout 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">
Article Layout – free Bootstrap 5 content section template
Article Layout · free Bootstrap 5 content section template

More Content Sections

Article with Table of Contents – free Tailwind CSS content section template

Article with Table of Contents

Tailwind CSS long-form article layout with a sticky table of contents that highlights the current section and shows reading progress.