Well, you can always create your own DTD to get new valid attributes for your tags. Browser won't hiccup, you should test your JavaScript if you can access these custom attributes. Or you can use the existing facilities provided by HTML and CSS. You can use multiple classes like
<a href="..." class="class-one class-two has-tooltip">
For the colour selection I strongly discourage you to use hard-coded colour names in your HTML, you have CSS for declaring styles. Use the class attribute as a hook for the CSS declaration, and choose semantic class names, for example
HTML:
<a href="..." class="has-tooltip common-tooltip">
<a href="..." class="has-tooltip long-tooltip">
CSS:
a.has-tooltip {
colour: red;
}
a.common-tooltip {
background: #ddd;
}
a.long-tooltip {
background: #ebf;
}
And in your JavaScript code you can generate elements with classes like "long-tooltip" and "common-tooltip" instead of "yellow-tooltip", so you won't contradict yourself in case of redesigning the page to have green tooltips.