TipsBlocks Web Technique Library

PRACTICAL WEB TIP

← Back to library

Editorial Marker Stroke

A marker-like stroke sweeps beneath a key word in an editorial headline.

Live Demo

Hover over the element or use Tab to focus.

Source Code

Copy the HTML, CSS or JavaScript you need for your project.

HTML
<a href="#article" class="tbx-1087"><small>EDITOR'S PICK / 2026</small><span class="tbx-1087__title">Better <em>Digital</em><br>Experiences <span aria-hidden="true">↗</span></span><span class="tbx-1087__more">Read article <b aria-hidden="true">→</b></span></a>
CSS
.tbx-1087{display:flex;flex-direction:column;justify-content:center;width:min(285px,100%);min-height:160px;padding:23px 20px 15px;border-bottom:1px solid #b8c7c8;color:#243943;background:#fff;text-decoration:none;font-family:system-ui,sans-serif}
.tbx-1087 small{font-size:9px;font-weight:750;letter-spacing:.16em;color:#739c99}.tbx-1087__title{font:750 24px/1.22 Georgia,serif;letter-spacing:-.035em;margin:15px 0 13px}
.tbx-1087__title em{transition:color .34s;font-style:normal;position:relative;z-index:0;white-space:nowrap}.tbx-1087__title em:after{content:"";position:absolute;z-index:-1;left:0;bottom:2px;height:9px;background:#f7ca77;width:100%;transform-origin:left;transform:scaleX(.08);opacity:.55;transition:transform .48s cubic-bezier(.2,.8,.2,1),opacity .48s}
.tbx-1087__title span{color:#5c9996;font-family:system-ui,sans-serif;font-size:20px}.tbx-1087__more{font-size:10px;font-weight:700;letter-spacing:.07em;color:#487e80}.tbx-1087__more b{font-size:13px;margin-left:5px;transition:margin .3s}
.tbx-1087:is(:hover,:focus-visible) .tbx-1087__title em{color:#117c75}.tbx-1087:is(:hover,:focus-visible) .tbx-1087__title em:after{transform:scaleX(1);opacity:1}.tbx-1087:is(:hover,:focus-visible) .tbx-1087__more b{margin-left:13px}
.tbx-1087:focus-visible{outline:3px solid #d4a663;outline-offset:3px}@media(prefers-reduced-motion:reduce){.tbx-1087 *, .tbx-1087__title em:after{transition:none!important}}

How to Use

Insert the HTML and add the CSS to your stylesheet. Adjust colors and sizes and avoid class conflicts.

Use Case

Useful for editorial layouts and links sections.

Technical Notes

Keep controls usable on touch devices. Test keyboard focus and reduced-motion preferences.

Mobile:Ensure the interactive content remains accessible without hover on touch devices.

Browser:Uses modern CSS. Check behavior in the browsers you support.

Reduced Motion:Check that prefers-reduced-motion is respected.