Add

Lorem ipsum

Lorem ipsum

A
A
A
Easter egg

35 views

4 min

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.

3. Add the script in Footer code

(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);
}
});
});
})();

good to know

The script uses a TreeWalker to scan text nodes without breaking the existing HTML. Avoid adding terms that are too short (1-2 letters) or too common: they could match in unwanted contexts. Always test in preview before publishing.

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

Good to know

Heading

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

Lorem ipsum dolor sit amet consectetur.

Lorem ipsum dolor sit amet consectetur. Aliquam orci sagittis dignissim sapien praesent donec.

Lorem ipsum

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Published on

You might be interested in these tutorials

Similar tutorials

SEO / GEO

5 min read

5 views

How to Set Up a Redirect in Webflow? (2026)

Updated on 19.12.2025 by Sandro DA SILVA

SEO / GEO

5 min read

5 views

Add structured data to your Webflow site?

Updated on 21.08.2025 by Sandro DA SILVA

No-code

5 min read

5 views

How to Obfuscate a Link in Webflow

Updated on 23.04.2025 by Sandro DA SILVA

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

Ready to launch
Your business?

Alexandre

Max

Enora

Bryan

Cannelle

Tiphaine

You'll :heart: our collaboration...