Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Create a ribbon by putting its label in real HTML text, then using CSS for its color, position, angle, and decorative shape. That keeps the label available even if visual effects are absent, while letting you choose a simple inline badge, an overlaid label, or a folded corner to suit the component.

Put the label in HTML; use CSS for the ribbon

Start with the words readers need to see—such as “New,” “Sale,” or “Featured”—as ordinary text in the document. Choose an element that matches the content’s role. A status or category is usually non-interactive; an action should be represented by an appropriate interactive element, such as a link or button, rather than made to look actionable with styling alone.

Semantic HTML and sensible source order help assistive technologies interpret the page. MDN Web Docs explains this in its guide to HTML as a basis for accessibility. Keep the label in the DOM rather than generating the only copy with a CSS pseudo-element. CSS can add decorative folds or other visual details, but it should not be the sole source of essential words.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose a ribbon style that fits its content

Inline badge

An inline badge stays in the text flow beside a heading, product name, or other content. It is a good fit when the label should not cover nearby text or controls. Use spacing, a background, and color to distinguish it without relying on color alone to convey what the label means.

#1 Best Overall
Sale
HTML and CSS: Design and Build Websites
  • HTML CSS Design and Build Web Sites
  • Comes with secure packaging
  • It can be a gift option

Positioned or rotated badge

An overlaid badge can sit near a component’s edge, with the component serving as its positioning context. A simple tutorial pattern uses a positioned parent and an absolutely positioned label, then adds padding, a background, and rotation. The offsets and angle are design choices, not a universal recipe; check the result against your own component dimensions and label length.

Corner-fold treatment

A corner ribbon can be built with clipping or pseudo-elements to create a strip and fold-like details. Keep the actual label as HTML text and treat those extra shapes as decoration. More elaborate geometry adds visual character but also creates more opportunities for the ribbon to collide with content at smaller sizes.

Build the effect in progressive steps

  1. Add readable text. Put the label in the document in a logical place relative to the item it describes.
  2. Apply basic styling. Add color, padding, and any necessary text styling so the label is legible before adding complex geometry.
  3. Place it in context. If the ribbon overlays a card or other component, establish that component as the positioning context and adjust the badge’s placement for the actual layout.
  4. Add optional decoration. Use rotation, clipping, pseudo-elements, or shadows only when they improve the design. Keep decorative generated content from becoming the only place the label appears.
  5. Check the result at realistic sizes. Test the component with different label lengths, narrow viewports, and zoom. Confirm the ribbon does not obscure the content it identifies or cover controls.

Make visual geometry an enhancement

Progressive enhancement means the words remain understandable without the ribbon’s most elaborate visual treatment. MDN describes CSS Shapes as visual progressive enhancement; for the relevant use of shapes with floated content, unsupported shapes fall back to rectangular text flow. That is a principle for using optional geometry, not a guarantee that every ribbon technique or CSS property behaves identically in every browser.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep the base presentation readable, then verify each effect against the browsers and devices you support. Do not assume that a clipping method, transform, or other decorative technique has the same support profile as another one.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Check meaning, overlap, and contrast

  • Meaning: The label should identify a real status or category in text. Do not make color or shape the only way to understand it.
  • Reading order: Place the label sensibly in the HTML source so it is encountered in a useful sequence with the item it describes.
  • Layout: At narrow widths and increased zoom, check whether a positioned ribbon hides a title, image detail, or control. Adjust its placement or use an in-flow badge if necessary.
  • Legibility: Check the text against the ribbon background and the ribbon against nearby content. Decorative shadows and folds should not undermine contrast or readability.
  • Role: Keep a status label non-interactive; use an actual link or button when the element performs an action.

These checks are practical design considerations, not a measured comparison of ribbon patterns. The right treatment depends on whether the label belongs in the flow, can safely overlay its component, and needs a simple badge or a more decorative corner.

Rank #4
Sale
Web Design with HTML, CSS, JavaScript and jQuery Set
  • Brand: Wiley
  • Set of 2 Volumes
  • A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.