Willy David Jr Willy David Jr - 19 days ago 6
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.