You could do something (not quite Wikipedia-style exactly, which is a little bit more fiddly) like this:
When you hover your mouse over the word, a tooltip (containing the text of what's in the title tag) will be displayed. You could style the <span> with a class e.g.
adding CSS rules as you like, e.g.
It's not quite the same as Wikipedia that somehow displays a teaser to another article within a small overlay that pops up when you hover over a link. Would the method I've described above work for you?
General help about tooltips at https://www.w3schools.com/css/css_tooltip.asp
Coding Wikipedia tooltips, see https://dev.to/ziratsu/coding-the-wikip ... ooltip-dh6
Code:
<span title="tooltip to appear">word</span>
Code:
<span class="tooltip" title="tooltip to appear">word</span>
Code:
span.tooltip { font-color: #36c;}span.tooltip:hover { text-decoration: underline;}
General help about tooltips at https://www.w3schools.com/css/css_tooltip.asp
Coding Wikipedia tooltips, see https://dev.to/ziratsu/coding-the-wikip ... ooltip-dh6
Statistics: Posted by mtgg — Thu Jul 04, 2024 3:04 am