Skip to content

Easter egg4 min read

How to Show Definitions on Hover for Technical Terms in Webflow

Learn how to automatically show a definition on hover for technical terms in your Webflow articles.

In this tutorial, Sandro, co-founder of the Gemeos Webflow agency, shows you how to automatically display a definition on hover for technical terms in your Webflow articles, no plugin needed.

Example

Hover over the purple underlined terms

To improve your CROConversion Rate Optimization: optimizing conversion rates., start by auditing your SEOSearch Engine Optimization: optimizing for search engines. technical setup. Keep an eye on your CTRClick-Through Rate: the click rate on a link or ad. in Search Console and your LCPLargest Contentful Paint: a Core Web Vitals loading speed metric. and CLSCumulative Layout Shift: a page visual stability metric. metrics. Also think about GEOGenerative Engine Optimization: visibility in AI tools like Perplexity or ChatGPT. if you want to show up in AI answers. Manage your content through a CMSContent Management System: a content management system. like Webflow to publish quickly.
TermDisplayed definitionCustomizable
CROConversion Rate Optimization...Yes, in the JS table
GEOGenerative Engine Optimization...Yes
LCPLargest Contentful Paint...Yes
Any custom termYour definitionYes, add an entry

1. Add the class to your article area

On the Div that contains your Rich Text, add the article-content class. The script only looks for terms in this area, not in the navbar or footer.

2. Customize the glossary

Update the glossary table in the script with your own terms and definitions. The script automatically detects matches in the text.

(function() {
  var glossary = {
    'CRO': 'Conversion Rate Optimization : optimizing conversion rates.',
    'GEO': 'Generative Engine Optimization : visibility in AI tools like Perplexity or ChatGPT.',
    'SEO': 'Search Engine Optimization : optimizing for search engines.',
    'CMS': 'Content Management System : a content management system.',
    'CTR': 'Click-Through Rate : the click rate on a link or ad.',
    'ROAS': 'Return On Ad Spend : return on ad spend.',
    'LCP': 'Largest Contentful Paint : a Core Web Vitals loading speed metric.',
    'CLS': 'Cumulative Layout Shift : a page visual stability metric.',
  };

  var style = document.createElement('style');
  style.textContent = '.glossary-term { border-bottom: 1px dashed #a78bfa; cursor: help; position: relative; }' +
    '.glossary-tip { position: absolute; bottom: 125%; left: 50%; transform: translateX(-50%);' +
    'background: #111; color: #fff; padding: 8px 12px; border-radius: 8px; font-size: 13px;' +
    'white-space: normal; min-width: 200px; max-width: 280px; z-index: 999; line-height: 1.5;' +
    'opacity: 0; pointer-events: none; transition: opacity 0.2s; }' +
    '.glossary-term:hover .glossary-tip { opacity: 1; }';
  document.head.appendChild(style);

  var content = document.querySelector('.article-content') || document.body;
  var walker = document.createTreeWalker(content, NodeFilter.SHOW_TEXT);
  var nodes = [];
  while (walker.nextNode()) nodes.push(walker.currentNode);

  nodes.forEach(function(node) {
    var text = node.textContent;
    Object.keys(glossary).forEach(function(term) {
      if (text.includes(term) && node.parentElement.tagName !== 'SCRIPT') {
        var span = document.createElement('span');
        span.innerHTML = text.replace(new RegExp('\b' + term + '\b', 'g'),
          '' + term +
          '' + glossary[term] + '');
        node.parentNode.replaceChild(span, node);
      }
    });
  });
})();

Conclusion

An inline glossary improves understanding and reduces bounce rate on technical articles. Use cases:

  • SEO/marketing articles with technical jargon
  • Product or SaaS documentation
  • Beginner guides with industry terms

Published on May 20, 2026

Sandro DA SILVA

Growth Marketer, Webflow expert, and jack-of-all-trades. Sandro handles commercial operations, ensures projects run smoothly, and addresses marketing-related issues (SEO, Tracking, Copywriting, etc).

You might be interested in these tutorials

Related tutorials

See all

You're going to working with us, guaranteed

Ready to launch your business?

get a quote

Let’s f*****G GO !!