Can it be done with pure CSS? Yes. However, with JavaScript you get much more control.
body { margin: 3em; }
.tooltip { position: relative; }
.tooltip::before {
content: "\2003" attr(class); /* print em-space with class text */
text-indent: -3.9em; /* add negative text offset to hide class name */
display: inline-block;
position: absolute; bottom: 50%;
background: #000; color: #FFF; padding: 5px; border-radius: 5px;
opacity:0; transition:0.3s; overflow:hidden;
max-width: 50%; /* avoids very long sentences */
pointer-events: none; /* prevents tooltip from firing on pseudo hover */
}
.tooltip:hover::before { opacity:1; bottom: 100%; }
<p class="tooltip Tooltip Text">My Text</p>
<p class="tooltip Dolor sit amet bla bla">Lorem Ipsum</p>
Basically I added an em space* and set a negative text-indent with overflow:hidden to hide the first part of text so that tooltip My Text here becomes My Text here. This is a bit hacky and you'll have to be careful of class name conflicts.
* The em-space is used to allow for some left padding.
jsFiddle: https://jsfiddle.net/azizn/gs1ye10r/2/
class? to the HTML?abc" title="tooltip. By the way, if that works, the application isn't protected against XSS attacks.