Willy David Jr Willy David Jr - 6 months ago 45
HTML Question

Disable Link Using CSS but Enable Title


.disabledLink {
pointer-events: none;
opacity: 0.6;
cursor: default;

<a href="www.google.com" class="disableLink" title="My Title" />
<span datahover="test">My Link</span>

Unfortunately, title is not appearing when hovering my mouse to the link. Is there a better way to enable title?


.disabled-link {
  pointer-events: none;
<span datahover="test" title="My Title"><a href="www.google.com" class="disabled-link">My Link</a></span>

Change your markup into this. It will work. Instead of targeting tag. I target the span for title. Hope it helps.