Look at the example below. This example shows the required functionality of a hint using javascript in html. We can set up an xsl sheet to take the hint tag and generate this.
<p> <form> <input type="button" onclick="this.nextSibling.style.display='inline';" value="A hint"/> <span style="display:none">Hello world!</span> </form> </p>